 Welcome

Welcome to Beyond Compare 3

Beyond Compare is a utility for comparing files and folders It can help you find and reconcile differences in source code, directories, images and data, even if your files are contained in zip archives or on FTP sites. It can synchronize your folders, and validate your copies.

Beyond Compare seamlessly coordinates the entire comparison job, from the folder structure down to individual differences in files. Specialized file viewers communicate difference info back to the folder comparison, helping you quickly concentrate on important differences. Beyond Compare remembers your various sessions so that you can come back to the same comparison job time after time.

This document describes both the Standard and Pro editions of Beyond Compare. Features that are only available in the Pro edition are indicated by this green icon:

Beyond Compare is available for both the Windows and Linux platforms. Items in this document that refer to a specific platform are indicated by these icons: win nix


What's New

Version 3 is a fairly complete rewrite of Beyond Compare. Like the transition from version 1 to version 2, we are taking this opportunity to rethink the user interface, redesign some of the internal fundamentals, and add significant new functionality.

Here are some of the significant new features in Beyond Compare 3. Items flagged with [image] are available in the Pro edition of BC3.

Expanded Session concept

· Any comparison can be saved as a session, not just folder comparisons
· Plug-ins are now built-in session types
· Saved sessions can be organized in folders
· Auto-saved sessions

Fully unicode enabled

· Unicode filenames now supported as well as unicode file content

Interface Improvements

· Tabbed interface for session views
· Handy "home" view for launching and managing sessions
· Layout of open sessions can be saved, restored
· Built-in "Check for updates"

Folder compare features

· Folder icons colors now match your preferences
· Multiple operations can be queued
· File actions now respect filters by default
· Dedicated folder sync session
· Touch and Attrib commands can now recurse through subfolders
· Attrib supports Unix attributes
· New Ignored command flags mismatched file as OK
· New Move to Folder command
· Flatten folders lets you compare differing folder structures
· Alignment overrides

Text comparison features

· Full in-pane editor with dynamic re-comparisons
· Syntax highlighting
· Adaptive gutter buttons for copying sections
· Unlimited undo after save
· Grammar-based comparison rules
· Independent file formats for each side of the comparison
· New Ignored command flags mismatched sections as OK
· Multiple bookmarks
· Hex display option for line details
· 3-way text merge
· Replacements

Improved FTP support

· FTP profiles, selectable per session
· Multiple simultaneous connections
· Built-in support for secure FTP protocols (SFTP and FTP over SSL)


Standard vs Pro

The Standard edition of Beyond Compare version 3 is a powerful full-featured comparison tool, not a stripped-down "lite" version. The Standard edition brings forward the functionality in Beyond Compare version 2, and adds full-screen editing, full Unicode support, syntax highlighting and much more.

The Pro edition adds a few advanced functions:

3-way text merge

Alignment overrides

Source control integration

SFTP support

Note Note The trial download of Beyond Compare actually contains both Standard and Pro editions. Your license key will unlock the appropriate edition for permanent use.


Using Beyond Compare

Beyond Compare handles a wide variety of comparison tasks. It has specialized viewers for different kinds of files and different approaches to reconciling differences.

Each comparison task is called a Session. Sessions can be individualized, named and reused. Many of Beyond Compare's settings are managed and stored by session rather than as program-wide options, to give you greater flexibility. You can save different Folder Compare sessions with quite different settings, to accommodate differing tasks.

A Child Session is a file comparison session that originated from a folder comparison session.

Sessions can be opened in separate windows, or as multiple tabs on a single window. (See Tab Options.) You can have multiple windows open, each with multiple tabs. You can drag a tab from one window to another, or right-click a tab and select Tear Off from the context menu to move that tab onto its own window.

The session settings that control how comparisons are performed are called Rules. Rules help you concentrate on important differences. Beyond Compare also maintains a list of File Formats to specify how various types of files are to be handled. You can modify the built-in File Formats or create your own.

This part of the documentation provides a reference guide to the various types of sessions and program concepts mentioned above.


Home View

The Home View

When you open a new window or tab, Beyond Compare displays the Home view:

From the Home view, you can:

· Start a new comparison session of any type
· Select from one of your previously saved sessions
· Select an auto-saved session
· Manage the settings for your saved sessions
· Edit the default settings to use for new sessions

You can also drag and drop files or folders from Windows Explorer onto this page to compare them. Drag and drop onto one of the Start New Session buttons to start a session of that specific type.

To customize your Home view, select Options Options from the Tools menu, then select General.


Managing Sessions

Beyond Compare automatically saves your most recent sessions so you can come back to them easily. If you want to retain a session indefinitely, you can save it with a descriptive name. You can also organize your named sessions within session folders.

The Session menu contains common commands for manipulating the current session. If you make a change to the parameters of a named session, you will be prompted to save it on exit.

Use the Home view to manage all your sessions in one place. You can select a saved session and edit its settings in the tabbed control at the right of the session tree. To rename or delete a session, right-click in the saved sessions tree and select the appropriate command.

A named session can be locked to guard against accidental modifications. Right-click a named session and select Lock from the context menu.

To change default session settings:

In the Home view's Saved sessions tree, under the Edit session defaults branch, select a session type. Edit the default settings in the tabbed control at the right of the tree.


Common Menu Items

The main menu changes depending on what kind of session is active. However, these menu items listed below are common across different session types.

From the Tools menu, select Configure Commands to define your own keyboard shortcuts, and hide or expose commands on the menus and toolbars. Commands shown in gray are hidden by default.

The Session menu:

 | New | Opens a new view with an empty session of the specified type.
 | New Tab * | Opens a new tab in the current window and displays the Home view.
 | New Window * | Opens a new window and displays the Home view.
 | Open Session | Opens a new view and displays the Home view.
 | Load Workspace | Lists saved workspaces. Selecting one closes any open views and restores the selected workspace configuration.
 | Load Workspace > Manage Workspaces | Lets you rename or delete saved workspaces.
 | Save Workspace As | Saves the current collection of windows and tabs as a named workspace.
SessionSave | Save Session | Saves the current session.
SessionSaveAs | Save Session As | Saves the current session under a new name.
 | Session Settings | Edits session-specific settings for the current session.
 | Close Tab | Closes the current tab.

The Tools menu:

Options | Options | Opens the Options dialog to set program preferences.
 | File Formats | Manages File Formats.
 | FTP Profiles | Opens the FTP Profiles dialog to manage FTP settings.
 | Source Control Integration win | Manages source control integration. Available in Windows version only.
 | Save Snapshot | Opens the Save Snapshot dialog to create a snapshot of a folder structure.
 | Export Settings | Opens the Export Settings dialog to selectively save settings and sessions to a file.
 | Import Settings | Opens the Import Settings dialog to selectively load settings and sessions from a file.
 | Customize Commands | Opens the Customize Commands dialog that controls keyboard shortcuts and visibility of commands on menus and toolbars.
 | Tweaks * | Displays the Tweaks dialog for setting obscure program options.

The Help menu:

Contents | Displays help contents.
Check for Updates | Checks to see if a newer version of Beyond Compare is available.
Support | Displays tips for getting support.
Enter Key | Opens the Register dialog to accept your license key.
About Beyond Compare | Displays the About box with program version and license information.

* Hidden by default. Use Tools > Configure Commands to show this command on menus or toolbars.


File Formats

Beyond Compare uses File Formats to specify how certain types of files are to be handled. For example, files with a .jpg or .png extension are associated with the Picture Viewer, while .c and .cpp files are recognized as C/C++ source. You can modify the built-in File Formats or create your own.

File Formats determine:

· The type of viewer used for visual comparison
· What conversion, if any, should be performed before and after comparison
· The syntax, or grammar, of the file's content
· Tab stops
· Which grammar elements are important or unimportant to the comparison
· Line weights to help the alignment process

File formats primarily control how the file viewers handles your files, but they can also affect how a Folder Compare session compares file contents. If you use rules-based content comparison, then the Folder Compare can limit the display to only files with important differences.

See also

Managing file formats

Rules vs. formats


Grammars

A File Format specification can include a grammar definition, used for syntax highlighting, and to help define differences that are important vs. unimportant.

For example, our standard file format for C/C++ source code includes a grammar that recognizes keywords, comments, and literal strings. By flagging differences in comments as unimportant, you can better concentrate on important differences.

A grammar definition in BC3 is fairly simplistic. It does not support nested or context-specific definitions, so it doesn't handle tagged languages like HTML and PHP very well. On the other hand, it is a big step up from BC2's functionality.

To edit a grammar, select Tools > File Formats and find the appropriate File Format. Select the Grammar tab and edit the grammar items.


Folder Compare

A Folder Compare session compares two folder structures side-by-side, in a variation of the familiar Explorer style. The comparison may be of folders on your hard drive or network, but either side also may be an FTP site, a zip archive, or a snapshot taken earlier. All of these have a directory structure -- folders and subfolders containing files -- and Beyond Compare treats them equivalently.

A typical Folder Compare strategy is to:

1. Define how to compare folder structures
2. Filter the view to show important differences
3. Reconcile the differences

The display aligns files and subfolders of the same name, left and right. You can modify the alignment by defining alignment overrides in the session's Rules Rules. You can also align files regardless of what subfolder they are in by using the View > Ignore Folder Structure command.

You can click on a column header to sort by that column, or right-click the header to choose different columns to display.


How to Compare Folders

There are several ways to compare folders and files.

If you want a quick look at what has changed between two folders, it might be sufficient to just look at the dates and sizes of file directory entries. If you are validating a CD copy, then a byte-by-byte comparison of every file is important. If you are comparing versions of source code, perhaps you want to consider only significant changes and ignore differences in whitespace or comments.

Session settings define how, overall, a Folder Compare session should compare folders. Comparison criteria include file timestamps, sizes, attributes and contents.

Generally, these criteria are used to compare files, and not folders directly. For instance, a folder's timestamp does not affect the comparison. A folder is classified as "newer" if it contains newer files. Folders are compared by aggregating the comparisons of files within them.

Certain facts about a file can be determined quickly while others take some time. The Comparison tab of the session settings dialog is organized into Quick tests and Requires opening files. File systems typically provide fast access to file names, sizes, and timestamps (the date and time last modified). But to get the CRC of a file, the entire file will need to be read. Keep this in mind when selecting folder comparison criteria.


Filtering the View

There are two overall type of filters you can use to control a Folder Compare's scope: File Filters that include or exclude files based on their name or attributes, and Display Filters that show or hide lines of the comparison based on comparison status.

For instance, you can set the display filter to Show Left Newer to display only those files that are newer on the left side of the comparison. Or you can set a file filter to exclude *.bak files if you don't want to see or manipulate them.

By default, commands that act on a selected folder's contents (such as Copy, Move, Delete, etc.) will respect the current filters. That is, if the selection includes a folder, the folder's filtered-out contents are skipped. (Note that this behavior has changed from BC version 2.) To change this default behavior, go to Tools > Options > Folder Views > Confirmations and enable Include hidden items by default. In either case, action dialogs allow you to override the default behavior on a case-by-case basis.

On the View menu, choose Suppress Filters SuppressFilters to temporarily suppress File Filters and Display Filters. Files and folders that were hidden will appear colored teal (blue-green) and can be processed.

File Filters

You can specify the type of files you want to include in (or exclude from) the session. For instance, if you are comparing Delphi projects you could include file types such as *.pas, *.dfm, and *.dpr. Or, you could include all files except *.dcu and *.~* by excluding these file types.

To specify a simple "include these types" filter, use the Filters field on the toolbar. Enter the file types separated by semicolons, or use the dropdown to select from presets. Include a minus sign (-) in front of files to be excluded.

In addition to these simple wildcard filters, you can specify more complex filters that include or exclude files or folders by name. From the Session menu, select Session Settings, and in the dialog select the Filter by Name tab. Or, simply click the File Filters Filters icon on the toolbar. See also Filter by Name.

Files can also be filtered based on their modified date, size, or file attributes. Select the Other Filters tab in the Session Settings dialog. (Folders are not directly filtered based on their attributes, but are affected by the filtering of their contents.) See also Other File Filters.

Display Filters

Display Filters limit the view to certain comparison results. The comparison results are determined by the session's comparison rules. For instance, you can pick Show Differences FavDiff to remove all the matching files so that you can concentrate on the mismatches.

See also Display Filters.

Folder Display Filters

Special folder display filters control when folders appear, other than to hold visible files.

Always Show Folders DirShowAll causes all folders to appear (unless they have been explicitly excluded by file filters), regardless of the other display filter selection.

Compare Files and Folder Structure DirCompareStructure causes folders to respect the display filters. For example, if the main display filter is Show All then all folders appear. If it is Show Orphans, only orphan folders and folders that contain orphan files are shown.

Only Compare Files DirCompareFilesOnly suppresses all empty folders, both truly empty folders and folders whose entire contents are hidden by other display or file filters.

Ignore Folder Structure DirFlatten hides the folder tree and aligns files regardless of what subfolder they are in.


Reconciling Differences

A Folder Compare session provides Actions, such as Copy, Move, Delete and Synchronize, to help you reconcile differences on the folder level. It also is a platform for spawning file views to understand and reconcile differences within files.

Actions generally require a selection. You can select specific files or folders from either or both sides and then perform some action on them. (If you want to synchronize the entire contents of the base folders, consider using a Folder Sync session instead.)

To select items in the Folder Compare view:

Click on an item on either side of the display to select it. You can click in the center column to select both sides at once. Hold down the CTRL key and click to add items to your selection. To select a range of items, press the mouse button over the first, swipe to the last, and release the button. If your swipe crosses the middle column, entries on both sides will be selected.

To select all items on one side:

Pick Select All SelectAll (or Select All Files SelectAllFiles) from the Edit menu. Hold down the SHIFT key and press the LEFT ARROW key to limit the selection to the left side (or RIGHT ARROW for a right-side selection).

To compare files with different names:

Click the first file, hold down CTRL and click the second one, and then select Compare Contents or Compare in New View. To use the keyboard instead, position on the first file and press SPACE, then position on the second one and press SPACE to Compare in New View.


Menus

Folder Compare Menus

Following is a description of the Folder Compare commands, in addition to the common menu items. Most of these commands are available as toolbar buttons. From the Tools menu, select Configure Commands to define your own keyboard shortcuts, and hide or expose commands on the menus and toolbars. Commands shown in gray are hidden by default.

The Session menu:

 | Session Settings | Opens the Session Settings dialog.
 | Swap Sides | Exchanges the left and right base folders.
 | Back | Goes back to (earlier) compared base folders.
 | Forward | Goes forward to (later) compared base folders.
 | Up One Level | Changes either or both base folders to their parent folders.
 | Compare Parent Folders in New View | Opens a new Folder Compare session based on the parent folders of the current base folders.
DirSyncSession | Sync Base Folders in New View | Opens a new Folder Sync session based on the current base folders.
Report | Folder Compare Report | Produces the Folder Compare report.
Info | Folder Compare Info | Displays comparison statistics.

The Actions menu:

 | Compare in New View | Opens selected files in a new view.
 | Compare in New View Using | Opens selected files in a new view, using a specified type of file viewer.
 | Merge in New View | Opens selected files in a new Text Merge session.
 | Quick Compare | Displays the Quick Compare dialog for the selected files.
 | Compare To | Allows you to select one file, and then click on a second file to compare them in a viewer.
 | Align With | Forces select items to be side-by-side. Items must be in the same folder.
Compare | Compare Contents | Compares contents of the selected items.
CopyRight | Copy to Right [Left] | Copies selected files, folders to the indicated side.
CopyLeftOrRight | Copy to Other Side | Copies selected files, folders to the opposite side.
MoveRight | Move to Right [Left] | Moves selected files, folders.
MoveLeftOrRight | Move to Other Side | Moves selected files, folders to the opposite side.
CopyTo | Copy to Folder | Copies selected files, folders to another folder.
MoveTo | Move to Folder | Moves selected files, folders to another folder.
UpdateLeft | Synchronize > Update Left | Within the current selection, copies newer and orphan items from right to left.
UpdateRight | Synchronize > Update Right | Within the current selection, copies newer and orphan items from left to right.
MirrorLeft | Synchronize > Mirror to Left | Within the current selection, replaces all different items on left, deletes any left-side orphans, and copies any right-side orphans to the left.
MirrorRight | Synchronize > Mirror to Right | Within the current selection, replaces all different items on right, deletes any right-side orphans, and copies any left-side orphans to the right.
Delete | Delete | Deletes selected files, folders.
Rename | Rename | Renames selected files, folders.
 | Attributes | Changes file attributes on selected files, folders.
Touch | Touch | Changes timestamps on selected files, folders.
 | Exclude | Excludes selected file, or type of file, from the current session.
 | New Folder | Creates a new folder.
 | Copy Filename | Copies a list of the selected items' paths to the clipboard.
Ignored | Ignored | Marks selected comparisons as ignored.
 | Refresh Selection | Refreshes the selected items.
Report | File Compare Report | Produces a File Compare report.
 | Explorer | Displays the Windows Explorer context menu for the selected item(s).

The Edit menu:

ExpandAll | Expand All | Opens all folders in view.
CollapseAll | Collapse All | Closes all folders in view.
SelectAll | Select All | Selects all visible items.
SelectAllFiles | Select All Files | Selects all visible files.
 | Invert Selection | Selects all items not currently selected, and deselects all items currently selected.
Refresh | Refresh | Refreshes open folders.
FullRefresh | Full Refresh | Refreshes entire comparison.

The Search menu:

Down | Next Difference | Positions at next unresolved difference.
Up | Previous Difference | Positions at previous unresolved difference.
 | Find Filename | Positions at item with specified name.

The View menu:

FavAll | Show All | Use no display filter on either side.
FavDiff | Show Differences | Filter out matches, based on file status, from both sides.
FavSame | Show Same | Filter out older, newer or different, and orphans from both sides.
viewNoOrphans2 | Show No Orphans | Filter out orphans from both sides.
viewMismatchNoOrphan | Show Differences but No Orphans | Filter out matches and orphans from both sides.
viewOrphans2 | Show Orphans | Filter out matches, older, and newer or different from both sides.
viewLtNew | Show Left Newer | Filter out matches, orphans, older on left (newer or different on right) from both sides.
viewRtNew | Show Right Newer | Filter out matches, orphans, newer or different on left (older on right) from both sides.
viewLtSource | Show Left Newer and Left Orphans | Filter out matches and older on left (newer or different on right) from both sides and orphans on the right side.
viewRtSource | Show Right Newer and Right Orphans | Filter out matches and newer or different on left (older on right) from both sides and orphans from the left side.
viewLeftOrphans | Show Left Orphans |
viewRightOrphans | Show Right Orphans |
FavNone | Show None * | Hide all files. Useful in conjunction with Always Show Folders to copy folder structures.
DirShowAll | Always Show Folders | Show all folders, except those excluded by file filters.
DirCompareStructure | Compare Files and Folder Structure | Show folders containing files or folders that match the current display filter. Orphan folders will follow the same filtering rules as orphan files.
DirCompareFilesOnly | Compare Files Only | Only folders holding visible files are shown.
DirFlatten | Ignore Folder Structure | Compare filenames regardless of which subfolder they may be in. (Also called Flatten Folders.)
SuppressFilters | Suppress Filters | Temporarily suppresses file filters and display filters.
IgnoreUnimportant | Ignore Unimportant Differences | Treats unimportant differences as same.
 | Columns | Shows or hides view columns.
 | Legend | Displays a window that lists what the different folder colors mean.
 | Log > Show Log | Shows or hides the log panel.
 | Log > Write Log | Writes the log to a file.

* Hidden by default. Use Tools > Configure Commands to show this command on menus or toolbars.


Folder Sync

A Folder Sync session is a specialized Folder Compare session that synchronizes folders by copying or deleting files.

Once you set up a Folder Sync session you can save it for future use.

Setting sync parameters

In the upper part of the view, specify the Left folder and Right folder involved. Either or both base folders may be on FTP sites. (You can use the Browse buttons to specify an FTP site.)

Select one of these standard sync methods from the drop-down control in the middle of the view:

Update Left UpdateLeft

Copies newer and orphan files from right to left.

Update Right UpdateRight

Copies newer and orphan files from left to right.

Update Both UpdateBidirectional

Copies newer and orphan files to the other side.

Mirror to Left MirrorLeft

Replaces all different items on left, deletes any orphans on left, and copies any right side orphans to the left.

Mirror to Right MirrorRight

Replaces all different items on right, deletes any orphans on right, and copies any left side orphans to the right.

Click the Rules button to define what constitutes a difference.

You can also specify Filters to limit the scope of the sync.

Previewing the sync

Click the Accept AcceptParams button if necessary to accept changes in, and a preview of all copy and delete operations will appear in the lower part of the view.

You can double-click any file pair to examine the differences in detail. To skip individual operations, right-click the line and pick Exclude from the pop-up menu.

Starting the sync

Click Start Sync SyncRun to begin processing.


Menus

Folder Sync Menus

Following is a description of the Folder Sync commands, in addition to the common menu items. Most of these commands are available as toolbar buttons. From the Tools menu, select Configure Commands to define your own keyboard shortcuts, and hide or expose commands on the menus and toolbars.

The Session menu:

 | Session Settings | Opens the Session Settings dialog.
 | Swap Sides | Exchanges the left and right base folders.
 | Up One Level | Changes either or both base folders to their parent folders.
 | Compare Parent Folders in New View | Opens a new Folder Compare session based on the parent folders of the current base folders.
DirSyncSession | Compare Base Folders in New View | Opens a new Folder Compare session based on the current base folders.
Info | Folder Compare Info | Displays comparison statistics.
 | Start Sync | Performs all sync actions.

The Actions menu:

 | Compare in New View | Opens selected files in a new view.
 | Compare in New View Using | Opens selected files in a new view, using a specified type of file viewer.
 | Exclude | Excludes selected file, or type of file, from the current session.
 | Copy Filename | Copies a list of the selected items' paths to the clipboard.
Ignored | Ignored | Marks selected comparisons as ignored.
 | Refresh Selection | Refreshes the selected items.
 | Explorer | Displays the Windows Explorer context menu for the selected item(s).

The Edit menu:

ExpandAll | Expand All | Opens all folders in view.
CollapseAll | Collapse All | Closes all folders in view.
SelectAll | Select All | Selects all visible items.
 | Invert Selection | Selects all items not currently selected, and deselects all items currently selected.
Refresh | Refresh | Refreshes open folders.
FullRefresh | Full Refresh | Refreshes entire comparison.

The Search menu:

Down | Next Difference | Positions at next unresolved difference.
Up | Previous Difference | Positions at previous unresolved difference.
 | Find Filename | Positions at item with specified name.

The View menu:

Peek | Peek | Temporarily view items that will not be affected by the sync.
IgnoreUnimportant | Ignore Unimportant Differences | Treats unimportant differences as same.
 | Columns | Shows or hides view columns.
 | Log > Show Log | Shows or hides the log panel.
 | Log > Write Log | Writes the log to a file.


Text Compare

A Text Compare session visually compares two text files, either in a side-by-side or over-under layout. It helps you analyse and reconcile differences, with a variety of display, search, and editing functions available.

The Text Compare view displays files in two editor panes that scroll together. Text is colored to highlight differences between the files. By default, the color scheme uses red to flag important differences (insertions, deletions, and changes) and blue for unimportant differences. The session's rules and fomats control how text is classified.

The display background is also colored to help you spot the differences. A light red background indicates an important difference somewhere on the line, while light-blue indicates an unimportant difference. The light red background takes precedence over the light blue. This makes it easy to find differences, even if they are horizontally scrolled out of view. You can adjust these colors to suit your preferences. (See Comparison Colors for File Views.)

On the left edge of the display is the optional thumbnail view. It represents each line of the comparison as a colored line, one pixel high. At a glance you can see the pattern of differences throughout the comparison. The white rectangle represents the main display's current view, and the small triangle represents the display's current line. Click on a line in the thumbnail to position the display at that location.

Below the main panes, the current line from each file is displayed using the entire width of the window. From the View menu, choose either Text Details for an editable text view, or Hex Details for a read-only hexadecimal view.


Editing Text

Line mode vs. Full Edit mode

How full-screen editing is different than a typical text editor


Walking Through Differences

The Next Difference Section Down and Previous Difference Section Up commands help you step through all the differences in your files, and all your files with differences. In the File Viewer, click Next Difference Section to position at the next section of mismatched text or Previous Difference Section to go back to the previous difference.

The arrow icons also change color from bright yellow to dull yellow to indicate that there are no more differences in that direction. To configure what happens when there are no more differences, see Next Difference Options.

The current File Format controls whether Next and Previous are on a line-by-line basis or a section-by-section basis. To access the current file format from a text compare session, select Session > Session Settings > Format and click the Edit button. Then, on the format dialog's Misc tab, toggle Lines are independent.

You can use Next Difference and Previous Difference to position on individual differences in long lines with multiple differences.

To jump directly to the next mismatched file while in the File Viewer, from the Search menu select Next Different File, or Previous Different File.


Searching for Text

In the File Viewer, select Find Find from the Search menu. You can either type the text or a regular expression pattern in the find box, or you can click the dropdown DropDown to select it from a list of previous searches. Clicking OK will move the cursor to the first line that meets the criteria. Clicking Select All does the same thing as clicking OK, but it selects all the lines that match the criteria.

The Find dialog options are:

Option | Meaning
Case sensitive | Only match text with the same character case (uppercase or lowercase).
Whole words only | Searching for apple will not match on apples, applesauce or snapple.
Wrap search | When one end of the file is reached, continue searching at the other end.
Regular expression | Interpret search string as a Perl-compatible regular expression.
Sides | Select which side of the file comparison to search: The current side or both sides.

Select Find Next FindNext or Find Previous FindPrev to continue searching for the same text.

To find and replace text, select Replace Replace.


Menus

Text Compare Menus

Following is a description of the Text Compare commands, in addition to the common menu items. Most of these commands are available as toolbar buttons. From the Tools menu, select Configure Commands to define your own keyboard shortcuts, and hide or expose commands on the menus and toolbars. Commands shown in gray are hidden by default.

The Session menu:

 | Session Settings | Opens the Session Settings dialog.
Swap | Swap Sides | Exchanges left, right sides.
Refresh | Reload Files | Reloads the displayed files, prompting to save first if necessary.
 | Compare in New View Using | Opens the displayed files in a new session using a different class of file viewer.
 | Merge in New View | Opens a new Text Merge session based on the currently loaded files.
 | Compare Parent Folders in New View | Opens a new Folder Compare session based on the parent folders of the currently loaded files.
Report | Text Compare Report | Produces the Text Compare report.
Info | Text Compare Info | Displays comparison statistics.

The File menu:

Open | Open File | Opens an existing file into the selected pane.
 | Open Clipboard | Loads the Clipboard contents into the selected pane.
 | Open With | Opens the selected pane's file in one of the external Open With applications.
WebBrowser | Open with Web Browser | Views contents of the selected pane in a web browser window.
Save | Save File | Saves the modified file from the selected pane.
 | Save File As | Saves the modified file from the selected pane with a new name.
 | Explorer | Displays the Windows Explorer context menu for the file in the selected pane.

The Edit menu:

Undo | Undo | Undoes previous action.
Redo | Redo | Redoes previously undone action.
 | Align Manually | Forces select lines to be side-by-side.
 | Isolate | Realigns comparison so that selected lines are by themselves.
CopySectionRight | Copy to Right/Left (section) | Copies current section to other side.
CopyTextRight | Copy to Right/Left (selection) | Copies selected lines to other side.
 | Increase Indent | Increases indentation of selected lines.
 | Decrease Indent | Decreases indentation of selected lines.
 | Cut / Copy / Paste / Delete | Standard editing commands.
 | Delete Line * | Deletes the current line.
 | Delete to Start Of Line * | Deletes text from the current position to the beginning of the line.
 | Delete to End Of Line * | Deletes text from the current position to the end of the line.
 | Delete Word * | Deletes the word at the current position.
 | Delete to Start Of Word * | Deletes from the current position to the beginning of the word.
 | Delete to End Of Word * | Deletes from the current position to the end of the word.
 | Insert Line Before * | Inserts a new blank line before the current line.
 | Insert Line After * | Inserts a new blank line after the current line.
 | Select All | Selects all visible lines in the current pane.
 | Select Section | Selects all lines in the current section.
 | Convert File > Trim Trailing Whitespace | Strips off spaces and tab characters at end of lines.
 | Convert File > Leading Spaces to Tabs | Replaces spaces at the beginning of lines with the appropriate number of tab characters (based on current tab stop setting).
 | Convert File > Tabs To Spaces | Replaces all tab characters with the appropriate number of space characters (based on current tab stop setting).
 | Full Edit | Toggles between full character mode editing in the main file view (enabled) and BC2-like line mode (disabled).

The Search menu:

 | Next Difference | Positions at next unresolved difference.
 | Previous Difference | Positions at previous unresolved difference.
Down | Next Difference Section | Positions at next unresolved difference section.
Up | Previous Difference Section | Positions at previous unresolved difference section.
 | Next Difference Files | Opens the parent folder compare session's next pair of files with differences. (Child sessions only.)
 | Previous Difference Files | Opens the parent folder compare session's previous pair of files with differences. (Child sessions only.)
CopyFileLeft | Copy File to Left and Open Next Difference | Copies the entire right-side file to the left and opens the folder compare's next different files. (Child sessions only.)
CopyFileRight | Copy File to Right and Open Next Difference | Copies the entire left-side file to the right and opens the folder compare's next different files. (Child sessions only.)
 | Next Edit | Positions at the next occurrence of edited text beyond the cursor.
 | Previous Edit | Positions at previous occurrence of edited text before the cursor.
Find | Find | Searches for matching text.
Replace | Replace | Replaces matching text.
FindNext | Find Next | Finds next occurrence of search string.
FindPrev | Find Previous | Finds previous occurrence of search string.
 | Replace Next * | Replaces next occurrence of search string.
 | Replace Previous * | Replaces previous occurrence of search string.
 | Replace All * | Replaces all occurrence of search string.
GoTo | Go To | Positions at specified line and column.
 | Toggle Bookmark | Places a numbered marker on the current line of the comparison, numbered from 0 to 9.
 | Go To Bookmark | Repositions at the specified bookmark.
 | Clear Bookmarks | Removes all bookmarks from the comparison.

The View menu:

FavAll | Show All | Shows all lines, differences or not.
FavDiff | Show Differences | Shows only lines with differences.
FavSame | Show Same | Shows only matching lines.
ShowContext | Show Context | Shows lines surrounding differences. The number of context lines can be set in Text Compare options.
IgnoreUnimportant | Ignore Unimportant Differences | Treats unimportant differences as same.
Ignored | Ignored | Ignore (or un-ignore) selected lines or current section.
ShowWS | Visible Whitespace | Shows or hides visible spaces, tabs.
ShowLineNum | Line Numbers | Shows or hides line numbers.
ShowSyntaxHighlighting | Syntax Highlighting | Shows or hides syntax highlighting.
 | Display Font * | Selects the font to use in editor panes.
SideBySide | Side-by-side Layout | Arranges editor panes side-by-side.
OverUnder | Over-under Layout | Arranges editor panes above and below each other.
ShowThumbnail | Thumbnail View | Show or hides the thumbnail summary of changes at left of view.
ShowTextDetails | Text Details | Shows or hides the text details panel at bottom of view.
ShowHexDetails | Hex Details | Shows or hides the hexadecimal details panel at bottom of view.
ShowRuler | Ruler | Shows or hides the line details ruler.
Info | File Info | Shows or hides file information panels at tops of editor panes.

* Hidden by default. Use Tools > Configure Commands to show this command on menus or toolbars.


Text Merge

A Text Merge session contains two or three read-only source panes and an output editing pane. The Left and Right panes hold two versions of a file. Beyond Compare helps you combine changes from both versions into the Output pane. The optional Center pane holds an older version of the file, a common ancestor of the left and right versions.

You can temporarily disable Center Page ShowCenter to give the left and right panes more room.

The output content is constructed automatically as the comparison loads. You can manually edit the output, or use Take buttons to pull text from a specific source file, overriding the default merge.

It is important to note that any prior copy of the output file is ignored. If it existed before the merge session, or was changed during the session, the existing content will be lost if you save the merge session output.


Using Text Merge

Once BC has completed the comparison it will show up to four panels: The left, center, and right panels at the top, with an output panel below it. If you include a center file BC will be able to compare both files to it and mark changes as additions, modifications, or deletions on each specific side. Changes on the left are marked in blue and changes on the right are marked in purple. Overlapping changes are considered conflicts and are marked in red. (You can change the color scheme if you like.)

Conflicts

Any time there are different changes in the left and right side that are on the same lines or within two lines of each other those sections will be considered a conflict and will be colored red in three input panels. The output will be considered a conflict. If the same change is made in both the left and right side it isn't considered a conflict.

Merging Data

You can navigate from difference to difference in both the input and output panels and the windows will stay synched up. When you are positioned on a difference you can use the Take Left, Take Center, and Take Right commands to accept the changes from the left or right or keep the original from the center. The "Take" commands are available on the toolbar, in each edit's popup menu, and as buttons next to each section in the output panel. When it first loads, the output panel will have selected all non-conflicting changes automatically, and each change will be colored to match the panel it originally came from. While merging you can also edit the output panel directly, which will change the section to yellow. If you want to revert to one of the original inputs just use the "Take" command again.

The editor can switch between "Line Mode" and "Character Mode" using either F2 or the Full Edit command on the toolbar (the pencil icon). In Line Mode it works similarly to BC2, where editing occurs on a line-by-line basis, so selection, cut, copy, paste, delete, etc all affect entire lines. While in line mode you can edit individual lines using the Line Details area. Line Mode supports disjointed selections. In Character Mode the viewer supports full in-line editing, and selection and editing commands all effect individual characters or spans of characters. Character Mode can only have a single, continuous selection.

Display Filters

When merging, the display filters switch from BC's traditional ones to new ones that check the merging status of each line. Using those filters you can limit the display to just conflicts or just changes on one side or the other.


Data Compare

A Data Compare session compares text files containing tabular data, such as .csv (comma separated values) files. Data is compared cell-by-cell.

The display uses color to highlight differences. A row with a light red background indicates an important difference somewhere on the line, while light-blue indicates an unimportant difference. The light red background takes precedence over the light blue. This makes it easy to find differences, even if they are horizontally scrolled out of view. You can adjust these colors to suit your preferences. (See Data Compare Options.)


Menus

Data Compare Menus

Following is a description of the Data Compare commands, in addition to the common menu items. Most of these commands are available as toolbar buttons. From the Tools menu, select Configure Commands to define your own keyboard shortcuts, and hide or expose commands on the menus and toolbars.

The Session menu:

 | Session Settings | Opens the Session Settings dialog.
Swap | Swap Sides | Exchanges left, right files.
Refresh | Reload Files | Reloads displayed files.
 | Compare in New View Using | Opens the displayed files in a new session using a different class of file viewer.
 | Compare Parent Folders in New View | Opens a new Folder Compare session based on the parent folders of the currently loaded files.
Report | Data Compare Report | Produces the Data Compare report.
Info | Data Compare Info | Displays comparison statistics.

The File menu:

Open | Open File | Opens an existing file into the selected pane.
 | Open Clipboard | Opens Clipboard contents into the selected pane.
 | Open With |
 | Save File As |
 | Explorer | Displays the Windows Explorer context menu for the file in the selected pane.

The Edit menu:

Copy | Copy | Copies selected rows to clipboard.
 | Select All | Selects all visible rows in the current pane.

The Search menu:

Down | Next Difference Row | Positions at next unresolved difference.
Up | Previous Difference Row | Positions at previous unresolved difference.
 | Next Difference Files | Opens the parent folder compare session's next pair of files with differences. (Child sessions only.)
 | Previous Difference Files | Opens the parent folder compare session's previous pair of files with differences. (Child sessions only.)
CopyFileLeft | Copy File to Left and Open Next Difference | Copies the entire right-side file to the left and opens the folder compare's next different files. (Child sessions only.)
CopyFileRight | Copy File to Right and Open Next Difference | Copies the entire left-side file to the right and opens the folder compare's next different files. (Child sessions only.)
Find | Find |
FindNext | Find Next |
FindPrev | Find Previous |
GoTo | Go To | Positions at specified row and column.

The View menu:

FavAll | Show All |
FavDiff | Show Differences |
FavSame | Show Same |
IgnoreUnimportant | Ignore Unimportant Differences |
 | Resize Columns to Fit | Makes columns wide enough for data to be fully visible.
 | Columns | Shows or hides columns.
ShowWS | Visible Whitespace | Shows or hides visible spaces, tabs.
ShowLineNum | Row Numbers | Shows or hides row numbers.
 | Display Font | Selects the font to use to display file data.
SideBySide | Side-by-side Layout | Arranges panes side-by-side.
OverUnder | Over-under Layout | Arranges panes above and below each other.
ShowThumbnail | Thumbnail View | Shows or hides the thumbnail summary of changes at left of view.
ShowTextDetails | Row Details | Shows or hides the row details panel at bottom of view.
Info | File Info | Shows or hides file information panels at tops of panes.


Picture Compare

A Picture Compare session compares a pair of image files visually, showing the differences between them.

Aligning Image Content

You can compare images that have been resized or cropped.

Select View > Stretch to Match PixStretch to automatically enlarge the smaller image before comparison.

If one image is a cropped version of the other, you can drag the mouse over the differences panel to offset one image in relation to the other. To reset the offset back to (0,0) select View > Reset Differences Offset or simply click on the offset display at the bottom of the differences panel.

For finer control, use the arrow buttons to nudge the offset one pixel at a time, or Ctrl+arrow buttons to move by a larger amount. Note that the center panel must be selected for the keyboard nudge function to work.

Hide Center Panel

Select View > Hide Differences Panel PixCompareNone to suppress the center comparison panel. The overall result of a pixel-by-pixel comparison is shown in the lower-left corner of the window.

Tolerance Mode

Select View > Tolerance Mode PixCompareTolerance to identify parts of the image that are more different than the tolerance setting, and those that are less different.

By default, the differences panel uses black for matching pixels, red for mismatches greater than the tolerance, and blue for mismatches less than the tolerance. You can change the colors to suit your preference. (See Picture Compare Options.)

Notice that this mode does not show you the quantitative degree of difference, but merely whether or not it exceeds the threshold set by Tolerance.

Enable View > Ignore Unimportant Differences IgnoreUnimportant to ignore any differences less than or equal to Tolerance. They will be handled the same as exact matches.

Mismatch Range Mode

Select View > Mismatch Range Mode PixCompareRange to show the degree of difference between the images. Various shades of yellow are used in the differences panel to highlight differences: the brighter the color, the greater the difference. Black is used for identical pixels.

Binary Operation Mode

Select View > Binary Operation Mode PixCompareBinaryOp to display in the differences panel an image created by applying a boolean operation on the RGB (red/green/blue) values of each pixel.


Menus

Picture Compare Menus

Following is a description of the Picture Compare commands, in addition to the common menu items. Most of these commands are available as toolbar buttons. From the Tools menu, select Configure Commands to define your own keyboard shortcuts, and hide or expose commands on the menus and toolbars.

The Session menu:

 | Session Settings | Opens the Session Settings dialog.
Swap | Swap Sides | Exchanges left, right images.
Refresh | Reload Files | Reloads images from files.
 | Compare in New View Using | Opens the displayed files in a new session using a different class of file viewer.
 | Compare Parent Folders in New View | Opens a new Folder Compare session based on the parent folders of the currently loaded files.

The File menu:

Open | Open File | Opens an existing file into the selected pane.
 | Open Clipboard | Opens Clipboard contents into the selected pane.
 | Open With |
 | Explorer | Displays the Windows Explorer context menu for the file in the selected pane.

The Edit menu:

Copy

Copy

Copies selection to the Windows Clipboard.

The Search menu:

 | Next Difference Files | Opens the parent folder compare session's next pair of files with differences. (Child sessions only.)
 | Previous Difference Files | Opens the parent folder compare session's previous pair of files with differences. (Child sessions only.)
CopyFileLeft | Copy File to Left and Open Next Difference | Copies the entire right-side file to the left and opens the folder compare's next different files. (Child sessions only.)
CopyFileRight | Copy File to Right and Open Next Difference | Copies the entire left-side file to the right and opens the folder compare's next different files. (Child sessions only.)

The View menu:

PixCompareNone | No Difference
PixCompareTolerance | Tolerance Difference
PixCompareRange | Range Difference
PixCompareBinaryOp | Binary Operation Difference
IgnoreUnimportant | Ignore Unimportant Differences
PixStretch | Stretch to Same Size
 | Reset Difference Offset
SideBySide | Side-by-side Layout
OverUnder | Over-under Layout
Info | File Info


Reports

Comparison reports allow you to save the information from a comparison to view later without re-running the comparison. These reports can be printed directly from Beyond Compare, or saved in HTML or plain text format.

The report feature is available on the Sessions menu in various types of sessions. For instance, in a Folder Compare session you would select Session > Folder Compare Report Report.

The style of reports available differs for the various session types, but the options are much the same. You can output a report to any of these locations:

· Printer
· HTML report (file or clipboard)
· Plain text (file or clipboard)

The HTML and Printer choices support difference highlighting with color.

You can preview a Printer report with the Print Preview command, or an HTML report with the View in Browser command.


FTP Access

In general, wherever base folders are used in Beyond Compare, you can use a folder on an FTP site instead.

Browsing to an FTP folder

Beyond Compare's Browse for Folder Browse | BrowseFTP dialog has a tab for FTP sites. On it, you can select a previously defined FTP profile, or enter a new hostname and other parameters. An FTP profile is automatically created with each new combination of hostname, protocol, and username that doesn't use the defaults.

The Initial remote directory field identifies the base folder on the FTP site. You can click Connect & Browse to find the directory interactively.

Typing an FTP specification

You can type an FTP specification directly into either of the base path edit controls by using this syntax:

ftp://username@ftp.hostname.com

The program will prompt for the password as needed. Or, you can include the password in the specification:

ftp://username:password@ftp.hostname.com

Leave the username off for anonymous access:

ftp://ftp.hostname.com

You can specify a folder relative to the login folder:

ftp://username@ftp.hostname.com/subfolder

...or relative to the site's root folder:

ftp://username@ftp.hostname.com//subfolder

To specify SFTP (SSH2) access, use this syntax:

sftp://username@hostname.com

To specify FTP over SSL (explicit SSL), use this syntax:

ftps://username@hostname.com


Using Snapshots

On the Tools menu, the Save Snapshot command saves a compressed read-only listing of the specified folder and all of its subfolders, including each file's timestamp, size, and file attributes. Snapshots have a .bcss file extension.

Snapshots are useful for detecting changes over time. Snapshot files can be loaded at a later date and compared to a live folder. You can load a snapshot just like any other base folder. Binary and Rules-Based content comparisons do not work on snapshots, since the files in the snapshot do not really exist.

If CRCs of the files are included in the snapshot, then CRC comparisons can be used to determine whether the contents of files have changed. This can be useful for detecting data corruption and other subtle changes to your data.

A snapshot remembers the name of the base folder it was produced from. If you load a snapshot on the command line (or drag a snapshot file onto the Beyond Compare icon), the program will automatically compare the snapshot with the original folder.

See also

Snapshot Options


Command Line and Scripting

Program Executable Files

As you would expect, Beyond Compare's setup program creates shortcuts to the main executable file, such as:

C:\Program Files\Beyond Compare 3\BCompare.exe

However, if you call Beyond Compare from a batch file or a version control system, you may want to call our BComp launcher program instead of calling BCompare directly. Here is a discussion of the differences between them:

BCompare.exe is the main application and only one copy will run at a time, regardless of how many windows you have open. If you launch a second copy it will tell the existing copy to start a comparison and exit immediately.

BComp.exe and BComp.com are two versions of the launcher program what will launch a BC comparison and wait for the comparison result before exiting. Use them anywhere where you need that behavior (version control merges, batch files, etc.).

BComp.exe is a Win32 GUI program. If launched from a version control system it should work just fine. If launched from a console window the console (or batch file) will not wait for it.

BComp.com is a Win32 console program. It has to have a console; if you launch it from one (or a batch file) that console will wait for the comparison to complete before returning. If you launch it from a version control system interactively, it will show a console window while it's waiting.

Generally you should just use BComp and let Windows figure out which to use. If you have to include an extension you should generally use BComp.exe. If it doesn't matter whether or not it waits, you can continue using BCompare.exe.

Command Line Parameters

You can add parameters to the command line of your Beyond Compare shortcuts to change how the program starts up or to execute a script.

Parameter | Meaning
Named Session | Opens the specified session in the Folder Viewer. (eg. BCompare.exe "MySession")
Pair of folders | Opens a new session in the Folder Viewer with the specified base folders using the default session settings. (eg. BCompare.exe C:\Folder1 C:\Folder2)
Pair of files | Opens the specified files in the File Viewer. (eg. BCompare.exe C:\File1.ext C:\Filer2.ext)
Script file | Automatically executes a list of commands without using a viewer. (eg. BCompare.exe @C:\Script.txt)


Command Line Switches

Beyond Compare can be called from a version control system with filenames given on the command line.

For a 2-way visual diff, use:

bcomp <Left File> <Right File>

For a 3-way merge, use:

bcomp <Left File> <Right File> <Center File> <Output File>

If the center file may be skipped, you can explicitly specify the output file with the /mergeoutput switch:

bcomp <Left File> <Right File> /mergeoutput=<Output File>

To merge the files automatically without the user interface:

bcomp <Left File> <Right File> <Center File> <Output File> /automerge

nix Note Linux users should prefix the switches with "-" instead of "/".

Here’s a summary of supported switches:

Switch | Meaning
/? | Displays command line documentation.
/fv=<type>, /fileviewer=<type> | Opens a new window of the given viewer type. <type> can be any of: "Text Compare" "Text Merge" "Hex Compare" "Data Compare" "Picture Compare"
/sync | Opens a Folder Sync view.
/qc=<type>, /quickcompare=<type> | Performs a quick comparison of the two files and sets the DOS ErrorLevel on exit. <type> can be size, crc, or binary, or can be left off to do a rules-based comparison. ErrorLevels are documented below.
/mergeoutput=<Output File> | Specify merge output, optionally without a center file.
/ro, /readonly | Viewer is read-only.
/lro, /ro1, /leftreadonly | Left side is read-only.
/rro, /ro2, /rightreadonly | Right side is read-only.
/cro, /ro3, /centerreadonly | Center is read-only.
/lefttitle=<Title>, /title1=<Title> | Description to show in left path edit.
/righttitle=<Title>, /title2=<Title> | Description to show in right path edit.
/centertitle=<Title>, /title3=<Title> | Description to show in center path edit.
/outputtitle=<Title>, /title4=<Title> | Description to show in output path edit.
/vcsleft=<Path> /vcsright=<Path> /vcscenter=<Path> /vcsoutput=<Path> | Path within the version control system. Used for file format matching and shown in the respective path edit if a title isn't given.
/automerge | Automatically merge the files and write to output, without user interaction. Merge output is not written if conflicts are found.
/force | Forces /automerge to create an output file with CVS-style conflict markers if conflicts are found.
/solo | Force a new instance of the program.
/nobackups | Disables backup file creation.
/ignoreunimportant | Turns on "Ignore Unimportant Differences".
/bds <file> | Prompts to compare against previous revisions available in the CodeGear RAD Studio/Borland Developer Studio "__history" directories. Add to the IDE Tools menu with "/BDS $SAVE $EDNAME" as the parameters or use the Beyond Compare IDE Expert from JED Software, available at www.jed-software.com
/favorleft /favorright | Non-conflicting changes from "favored" side are drawn without coloring or section lines in the merge output, and ignored unimportant conflicts automatically take changes from that side instead of the center.
/savetarget=<Path> | Text comparison's "Save" command will overwrite the specified file rather than the original file.
/reviewconflicts | Automatically opens the interactive merge if conflicts are found during an /automerge.
/silent | Causes a script to be processed invisibly, bypassing the Task Bar entry and Scripting Status window. All interaction will be suppressed, so any unresolved issue that would normally show a dialog will log an error instead.
/closescript | Closes the script window on completion. Overrides the Close when finished setting in Tools > Options > Scripts.

The following DOS Error Levels are set on exit:

0 | Success
1 | Binary Match
2 | Rules-Based Match
11 | Binary Difference
12 | Similar
13 | Rules-Based Difference
14 | Conflicts Detected
100 | Unknown error
101 | Conflicts Detected. Merge output not written.

Beyond Compare also supports command lines from ClearCase automatically for interactive and silent comparisons and merges.


Scripts Overview

Beyond Compare provides a script processing feature, available from the command line, which allows you to automate routine tasks performed with Beyond Compare's Folder Viewer. A script is a simple text file containing a list of commands which can control the program and automatically perform file operations.

Scripts run without displaying the usual Folder Viewer window, but might require input for certain confirmations. To execute a script, specify it on the command line with a leading '@' symbol, as in:

BCompare.exe @C:\Scripts\MyScript.txt

At its most basic, a script is a simple series of commands. The shortest meaningful script would be something like:

load "C:\Windows\Temp"
select all
delete all

which deletes all files and folders in the Windows "Temp" folder.

Scripts essentially manipulate an invisible folder comparison: file operations require selections, the "display" can be limited with filters, and folders can be "expanded" to recurse into them. Any folder name argument can be a folder on your system, on the network or an FTP site, or the name of a folder-like archive such as .ZIP, .CAB, or Beyond Compare Snapshot file.

Scripts are processed line by line, with a single command per line. Scripts are not case sensitive, and blank lines and comments (anything after a '#') are ignored. Arguments are separated by spaces. To include a space in an argument, surround the argument with quotes ("). To continue a long command on a second (or third) line, add an ampersand (&) at the end of every line but the last.

In addition to the standard commands, command line parameters and environmental variables can be inserted into the script at run time. Command line variables are specified by a percent sign (%) and a single number from 1-9. The script name and command line switches starting with / are not included in the 1-9 list. The scripting command:

load "%1"

would load whatever session was given on the command line, as in "BCompare @script.txt MySession".

Environmental variables are inserted by enclosing the variable name in percent signs, and are case sensitive. The following performs the same as the earlier script, except it gets the folder from the environment:

load "%TMP%"
select all
delete all

There are several dynamic variables that Beyond Compare can fill in at each line of the script. The %date% variable fills in the current date in the format yyyy-mm-dd. The %time% variable's format depends on your computer's regional settings. The %fn_time% variable outputs the time as hh-mm-ss, which can be used for filenames.

Scripting Options

The command line switches that affect scripting are /silent, /closescript, and the various /readonly switches. Normally, script processing adds an entry on the Task Bar and displays a Scripting Status Window detailing its progress and any errors. The /silent switch bypasses the Task Bar entry and Scripting Status Window, allowing Beyond Compare to process the script invisibly.

To change the script processing options, select Options from the Tools menu. Check the Beep when finished option to have Beyond Compare sound an audible beep when it completes script processing. This beep can alert you to check and close the Scripting Status window. Close when finished causes Beyond Compare to automatically close its Scripting Status window when it completes script processing. When used in conjunction with Beep when finished, the beep simply tells you the process has completed.

There is also a place to designate a Shared scripts folder. When you provide a script name argument on the command line with no path designation, and there is no file of that name in the current folder, Beyond Compare will look in the Shared scripts folder for that script.


Scripting Reference

These are the script commands (in alphabetical order):

ATTRIB BEEP COLLAPSE COMPARE COPY COPYTO CRITERIA DELETE EXPAND FILE-REPORT FILTER FOLDER-REPORT LOAD LOG MOVE OPTION RENAME SELECT SNAPSHOT SYNC TOUCH

ATTRIB win

Usage:

attrib (+|-)<attrib set 1> [(+|-)<attrib set 2> <...>]

Sets (+) or clears (-) the DOS file attributes in the current selection. An attribute set can include archive (a), system (s), hidden (h), and read only (r) attributes. win Windows only implementation: Linux version will not recognize ATTRIB.

Examples:

attrib +h

attrib +sh -a

BEEP

Usage:

beep

Beeps the PC speaker. The beep occurs regardless of the /silent command line switch.

COLLAPSE

Usage:

collapse all

collapse <path> [<path> [...]]

Collapses all folders or folders with specified paths. Paths are relative to the base folder and can not have wildcards.

Example:

collapse "Folder 1" Folder2\SubFolder

COMPARE

Usage:

compare [CRC|binary|rules-based]

Compares the contents of the current selection using the compare type. By default, the most recent compare type is used.

This command only compares files once. To change how files are compared after modification, use CRITERIA.

COPY

Usage:

copy (lt->rt|rt->lt)

Copies the selected files/folders in the direction indicated.

COPYTO

Usage:

copyto [lt|rt|all] [path:(relative|base|none)] <path>

Copies the selected files/folders on the specified side to the specified path using the path option. base keeps the entire folder structure relative to the base folders of all selected items. relative keeps the minimum relative folder structure of all selected items.

The defaults are all and path:none.

CRITERIA

Usage:

criteria [attrib:<attrib set>] [version] \

[timestamp[:[#sec][;IgnoreDST]]] \

[size|CRC|binary|rules-based] \

[timezone:(ignore|(lt|rt)(+|-)<0..12>)]

Sets all comparison criteria settings.

· attrib enables comparisons of the specified DOS file attributes. Use a for Archive, s for System, h for Hidden, and r for read-only. win Windows only implementation: Linux version will not recognize attrib.
· version enables comparisons of version information common in exes and dlls.
· timestamp enables timestamp comparisons.
o #sec considers differences within a tolerance of seconds as matches.
o IgnoreDST considers differences of exactly 1 hour as matches.
· size, CRC, binary, and rules-based are the possible ways to compare contents.
· timezone ignores timezone differences or applies timezone offset to the specified side.

Example:

criteria attrib:sh timestamp:2sec;IgnoreDST rules-based timezone:lt+6

DELETE

Usage:

delete [recyclebin=(yes|no)] (lt|rt|all)

Deletes the currently selected files/folders on the specified side(s). The recyclebin argument only has effect where supported by Windows. Windows does not recycle from network drives, FTP sites, and within zip and other archive files.

EXPAND

Usage:

expand <path> [<path> [...]]

expand all

Expands specified subfolders, or all subfolders. Paths are relative to the base folder and can not have wildcards. Subfolders must be expanded in order for their contents to be used by other commands, like SELECT. expand all will not expand subfolders that have been excluded from the comparison by File Filter settings.

FILE-REPORT

Usage:

file-report layout:<layout> [options:<options>] \

[title:<report title>] \

output-to:(printer|clipboard|<filename>) \

[output-options:<options>] [<filename1> <filename2>]

Generates a file comparison report of the currently selected files.

· layout controls the reports appearance, and can be any of over-under, side-by-side, composite, patch, statistics, or xml.
· options is optional, and is used differently for each layout.
o ignore-unimportant treats differences in unimportant text as matches and is available in all layouts.
o display-all, display-mismatches, display-context, or display-matches can be used to control which lines of the comparison are included in the report and are available in all layouts except patch and statistics. By default, display-all is used.
o line-numbers includes line numbers in the side-by-side layout.
o stats-descriptive or stats-tabular (CSV) formats are available in the statistics layout. By default, stats-descriptive is used.
o patch-normal, patch-context, or patch-unified formats are available in the patch layout. By default, patch-normal is used.

Both file-report and folder-report must include information on where the report should be sent, and may include additional information on the output format.

· title controls the title that appears at the top of the report.
· output-to controls the output target. It can be printer, clipboard, or a filename.
· output-options is optional and is used differently for each output target.
o print-color or print-mono color schemes are available for printer output.
o print-portrait or print-landscape orientations are available for printer output. By default, print-portrait is used.
o wrap-none, wrap-character, or wrap-word control whether long lines are wrapped. Printer output can use all three options. HTML output can use wrap-none and wrap-word. By default, wrap-none is used.
o html-color, html-mono, or html-custom=<filename> stylesheets are available for clipboard and file outputs. If html-custom is used it should include a URL or path, which will be used as the HTML's external style sheet.

Examples:

file-report layout:over-under options:display-context output-to:printer &

output-options:print-color,wrap-word

file-report layout:patch options:ignore-all,patch-unified &

output-to:"reports\report.txt"

FILTER

Usage:

filter <file masks>

filter cutoff:([<|>](<timestamp>|#[days])|none)

filter attrib:((+|-)<attrib set>|none)

filter size:([<|>]#[KB|MB|GB|TB]|none)

Controls which folders and types of files are compared by using name filtering (file masks), date filtering (cutoff), or other filtering (attrib or size).

· Name filters include and exclude files and folders based on their names and paths. Multiple masks can be separated by semicolons. To indicate that a mask is an exclude mask use a leading minus (-). To indicate that a mask affects folders use a trailing backslash (\).
· cutoff excludes all files older (<) or newer (>) than a timestamp or a number of days from the current system date (#days). By default, cutoff:< is used. none can be used to remove date filtering. The date parsing is fairly lenient, but if you want to be sure it parses correctly, use the format specified by the operating system's regional settings. (See Control Panel > Regional and Language Settings.) The time is optional, and should follow the date (cutoff:"01/01/2001 12:00pm"). Remember to use quotation marks (" ") whenever a term contains a space.
· attrib limits the comparison to files which have an included DOS file attribute (+) and don't have an excluded attribute (-). none can be used to remove attribute filtering. Use a for Archive, s for System, h for Hidden, and r for read-only. win Windows only implementation: Linux version will not recognize attrib.
· size excludes all files smaller (<) or larger (>) than the given size. By default the size is given in bytes, but you can add KB, MB, or GB to the end to indicate that the value is in kilobytes, megabytes, gigabytes, or terabytes, respectively. none can be used to remove size filtering.

Examples:

filter "*.pas;*.dpr;*.dfm"

filter cutoff:<7days

filter cutoff:>"Jan 1, 2001"

filter cutoff:"01/01/2001 12:00pm"

filter attrib:-sh

filter "*.txt;-Recycle Bin\" attrib:+r

FOLDER-REPORT

Usage:

folder-report layout:<layout> [options:<options>] \

[title:<report title>] \

output-to:(printer|clipboard|<filename>) \

[output-options:<options>]

Generates a folder comparison report of the currently loaded base folders. Folders are shown in their current state. To include subfolders add an expand all command before this.

· layout controls the reports appearance, and can be side-by-side, summary, or xml.
· options is optional.
o Display filter flags control which files are included in the report. The possible values are display-all, display-mismatches, display-no-orphans, display-mismatches-no-orphans, display-orphans, display-left-newer, display-right-newer, display-left-newer-orphans, display-right-newer-orphans, and display-matches. By default, display-all is used.
o Optional columns can be included, separated by commas, in the report by using the flags column-version, column-size, column-crc, column-timestamp, column-attributes, column-group, column-owner, and column-vcs. By default, column-size and column-timestamp are included. column-none can be used by itself to clear the default columns.
· title, output-to, and output-options arguments are documented under FILE-REPORT.

Examples:

folder-report layout:side-by-side &

options:column-size,column-version,column-timestamp &

output-to:clipboard output-options:html-color

folder-report layout:xml output-to:"C:\Folder Report.xml"

LOAD

Usage:

load <session>

load <left path> [<right path>]

load <default>

Loads the specified session, the specified base folders, or the Default Session Settings (load <default>). Failure to load a base folder will cause the script to terminate.

· Loading a session causes all that session's settings, except the display filter (show all, only mismatches, only matches, etc.), to be used.
· Loading base folders uses the currently active settings. By default, the program defaults are used.

Examples:

load "MySession"

load "c:\project 1" "x:\project 1"

load <default>

LOG

Usage:

log [none|normal|verbose] [[append:]<filename>]

Controls how detailed the log is and where the log is stored.

· none, normal, and verbose determine the amount of detail used in the log. Logging is initially disabled and begins when the mode is changed from none.
· append: causes logging to add to the file instead of replace it. By default, the log is output as Log.txt in the current directory (eg, the Windows "Start In" folder in shortcut properties).

MOVE

Usage:

move (lt->rt|rt->lt)

Moves the selected files/folders in the direction specified.

OPTION

Usage:

option stop-on-error

option confirm:(prompt|yes-to-all|no-to-all)

Adjusts script processing options.

· stop-on-error makes the script watch for various error conditions, including file operation errors, and, when one occurs, prompts the user before continuing.
· confirm can use prompt, yes-to-all, or no-to-all to handle confirmation dialogs that occur due to file operations. By default, prompt is used.

RENAME

Usage:

rename [regexpr <old mask>] <new mask>

Performs a multi-file rename on the current selection using the specified new mask. regexpr uses an old mask to perform a "Regular Expression Rename". By default, a DOS-style rename is performed.

Examples:

rename *.bak

rename regexpr (...)(...)\.txt $2$1.txt

SELECT

Usage:

select <select mask 1> [<select mask 2> <...>]

Select controls which files and folders can be operated on. Only files and folders that match at least one of the selection masks are part of the selection. A selection mask has the format, [<side>.][<difference>.][<item>].

· A side (left or lt, right or rt, all) limits the selection to the specified side. By default, all is used.
· A difference (exact, diff, newer, older, orphan, all) limits the selection based on results of comparison. diff refers to differences in criteria other than timestamps. To compare timestamps use newer or older instead. Folders must contain only the specified result type to be affected. By default, all is used.
· An item (files, folders, all) limits the selection to files, folders, or both. By default, all is used.

empty.folders is a special selection mask that will select empty folders.

Examples:

select lt.files rt.orphan.folders

select all

select lt.all

select lt.files.all

select diff

SNAPSHOT

Usage:

snapshot [save-crc][save-version][expand-archives][no-filters] \

lt|rt|path:<path> [output:<target>]

Saves a read-only snapshot of the specified folder.

· save-crc calculates CRC's for all files and stores them as part of the snapshot.
· save-version stores version information for executable files.
· expand-archives stores the contents of archive files in an expanded format.
· no-filters stores all files regardless of the active filename filters.
· lt, rt, and path indicate which folder is stored. lt and rt will save a snapshot of one of the loaded base folders, and path will save a snapshot of a specified path.
· output is optional and determines where the snapshot will be saved. By default, it will be saved in the current folder.
o If target is a fully qualified filename, that will be the name of the snapshot. If target doesn't have an extension, .bcss will be used.
o If the target isn't included or refers to a folder a filename will be generated based on the source folder's name and the current system date, eg folder_2000-12-31.bcss. If necessary an additional number will be added to the generated name to keep it from overwriting existing snapshots.

Examples:

snapshot save-crc save-version no-filters path:C:\ output:D:\

snapshot lt output:"Home Copy.bcss"

SYNC

Usage:

sync [visible][create-empty] (update|mirror):(lt->rt|rt->lt|all)

Uses the Synchronize Folders engine to update a pair of folders. This command does not use the current selection.

· visible enables "Only affect visible files" behavior. Only files in expanded folders will be affected.
· create-empty enables the "Create empty folders" behavior.
· update copies newer and orphan files in the indicated direction, leaving orphans and newer files on the opposite side unchanged. Using all as the direction indicates a bidirectional sync, and copies newer and orphan files in both directions.
· mirror makes the target folder identical to the source one. Newer, older, different, and orphaned files are all copied to the destination, and orphans in the destination are deleted. The all direction doesn't apply in this context, and is not valid.

Example:

sync create-empty mirror:lt->rt

TOUCH

Usage:

touch (lt->rt|rt->lt)

touch (lt|rt|all):(now|<timestamp>)

Copies the timestamps from files on one side to the other, or sets the timestamps of all files on a specified side to the current system time (now) or a specified timestamp. You must select files before you can touch them.


Sample Scripts

The following are some sample scripts to show how Beyond Compare can use scripts. You can either use these scripts as is or model your own scripts after them.

Here is a basic script which copies all of the newer and orphaned files from one folder to another, using a previously created session:

load "Sync Laptop"

sync update:left->right

Synching two folders

Here is a more advanced script which syncs two specific folders using advanced filters. This works the same as loading the folders in the Folder Viewer and performing a "Mirror Left to Right" folder synchronization.

# Turn logging on

log normal "C:\My Documents\Webpage\Synclog.txt"

# Load the default session and exclude all but certain file types

load <default>

filter "*.html;*.htm;*.png;*.jpg"

# Load the base folders

load "C:\My Documents\Webpage" "ftp://user@ftp.some-isp.com/webroot"

# Copy different files left to right, delete orphans on right

mirror left->right

Comparing two files by name

This script compares two files by name.

file-report layout:side-by-side &

options:display-mismatches &

output-to:%3 %1 %2

A sample command line, calling the above script:

bcompare.exe @GenerateReport.txt Mine\Sample.txt Theirs\Sample.txt Report.txt

Note Note An ampersand (&) at the end of a line means that the command continues on the next line.

Note Note %1, %2, and %3 refer to the 1st, 2nd and 3rd command line argument, respectively.

Generating a report

This script compares two files by name and generates an html report showing differences with context:

file-report layout:side-by-side &

options:ignore-unimportant,display-context &

output-to:%3 output-options:html-color %1 %2

Keeping a web site in synch

This script keeps a web site in sync with development files.

#log the script

log verbose append:"c:\website updates.txt"

#set the comparison criteria

criteria timestamp size

#load source and target

load c:\website ftp://web@vmscooter-linux/html/testing

#filter to only include source files, ignore CVS subdirectories

filter "*.htm;*.html;*.php;*.jpg;*.gif;-CVS\"

#Sync the local files to the web site, creating empty folders

sync create-empty mirror:lt->rt

Performing a rules-based comparison and logging results to a file

This script logs the script results to a file that uses the current date as part of the name. The variable %date% is expanded by the script in the format 2004-10-13 on U.S. English systems, on other systems it will match the system locale. It performs a rules-based comparison of Pascal source files and generates a text report of mismatches.

#log to a file of the form log2004-10-13.txt

#the exact format depends on your regional and language settings

log verbose append:projectlog%date%.txt

#compare the text contents of the files

criteria rules-based

#only compare delphi source files, ignore the archive folder

filter "*.pas;*.dfm;*.dpr;*.inc;-archive\"

load s:\project\chris s:\project\tim

folder-report layout:summary &

options:display-mismatches,column-attributes,column-timestamp,column-size &

output-to:projectreport.txt

Comparing current folder state to a snapshot

This script compares the current state of a folder to a snapshot from the last time updates were sent out. Then it copies the changed and new files to a .zip file and updates the snapshot of the folder.

option confirm:yes-to-all

#compare using crc

criteria crc

#load current files against snapshot from the last patch

load "c:\folder" "c:\folder.bcss"

#expand to affect subfolders and files

expand all

#select updated files

select lt.diff.files lt.orphan.files

#copy changes to a .zip file

copyto lt path:relative "c:\folderchanges.zip"

#update the snapshot

snapshot save-crc lt output:"c:\folder.bcss"

Generating a report of differences

This script generates a report of only differences.

#set up basic comparison features

criteria timestamp:2sec

#filter out log files

filter "-\dir1\dir2\*.log"

#load first comparison

load \\srv1\share \\srv2\share

#compare files with timestamp differences

select newer.files older.files

#generate a report of the differences

folder-report layout:summary options:display-mismatches output-to:C:\report.txt


Automating a Script

You can use Beyond Compare's script processor to perform certain tasks, such as synchronizing folders, without interaction. For example, to automate a backup of your C:\My Documents folder, enter the following script commands into Notepad:

load "C:\My Documents" "C:\Backups"
expand all
select left.newer.files left.orphan.files
copy left->right

Save this text file as: C:\My Documents\Sync.txt

A Beyond Compare script can be run at any desired time by using Window's Task Scheduler:

1. Open the Control Panel and double-click Schedule Tasks.
2. Double-click Add Scheduled Task.
3. In the Scheduled Task Wizard, select "Beyond Compare 3" from the list of installed applications and follow the instructions.
4. Double-click the newly created scheduled task to open the Properties dialog.
5. In the Run field add a reference to your script file:
BCompare.exe @Sync.Txt
6. Change the Start In field to be the location of the script file:
"C:\My Documents"

Note Note If you are running Windows XP, you will first need to select Performance and Maintenance from the Control Panel before selecting Schedule Tasks.

We recommend including a log command in your script. If you have trouble with your script, check out the Scheduled Tasks error log: "SchedLgU.txt" in your Windows directory.


Regular Expressions

Regular Expressions are a powerful way to define patterns for searching and matching. Beyond Compare allows you to use regular expressions when searching through text, and when specifying rules for classifying text. The regular expression support in Beyond Compare is a subset of the Perl Compatible Regular Expression (PCRE) syntax.

While Regular Expressions can be a complex topic, there are several excellent resources about them. One such resource is a book called Mastering Regular Expressions. Another excellent resource is Steve Mansour's A Tao of Regular Expressions, a copy of which can be found at:

jmason.org/software/sitescooper/tao_regexps.html

A regular expression is composed of two types of characters: normal characters and metacharacters. When performing a match, metacharacters take on special meanings, controlling how the match is made and serving as wildcards. Normal characters always match against only themselves. To match against a metacharacter, escape it, by prefixing it with a backslash "\". There are multiple types of metacharacters, each detailed below.

Metacharacters - Escape Sequences

Escape Sequence | Meaning
\xnn | character with the hex code nn
\x{nnnn} | character with the hex code nnnn
\x{F000} | character with a null value
\t | tab (0x09)
\f | form feed (0x0C)
\a | bell (0x07)
\e | ESC (0x1B)

Metacharacters - Predefined classes

Predefined character classes match any of a certain subset of characters. The following classes are already defined for you.

Class | Meaning
. | match any character
\w | any alphanumeric character or _
\W | any non-alphanumeric character
\d | any numeric character (0-9)
\D | any non-numeric character
\s | any whitespace (space, tab)

You can also construct your own character classes by surrounding a group of characters in brackets "[]". The predefined classes (except ".") can be used in the brackets, and if a dash "-" appears between two characters, it represents a range. Thus [a-z] would represent all lowercase letters, and [a-zA-Z] would represent both lower and uppercase letters. To include a "-" as part of the class, place it at the beginning or end of the string.

If the first character within the brackets is a caret "^", then the class represents everything except the specified characters. [^a-z] matches on any character that isn't a lower-case alphabetic character.

Metacharacters - Alternatives

By placing an "|" between two groups of items, alternative matches can be represented. a|b will match either a or b. ab|cd will match "ab" or "cd", but not "ac". "|" groups characters from pattern delimiter ("(", "[", or the start of the pattern) to itself and then again to the end of the pattern. Alternatives can be placed within parenthesis "()" to make it obvious what is being matched against, as in a(bc|de)f. Alternatives are matched left to right; bey|beyond will match on bey, even if the string is "beyond".

Metacharacters - Position

The following metacharacters control where the match can occur on a line. Note: \A and \Z match the start and end of text respectively, but since Beyond Compare performs the search on a line by line basis, these have the same effect as ^ and $.

Metacharacter | Meaning
^ | match only at start of line
$ | match only at end of line

Metacharacters - Iterators

Anything in a regular expression can be followed by an iterator metacharacter, which refers to the item before it. There are two kinds of iterators - greedy and non-greedy. Greedy iterators match as many as they can, non-greedy match as few as they can.

Greedy:

Metacharacter | Meaning
* | match zero or more of the preceding character (equivalent to {0,})
+ | match one or more of the preceding character (equivalent to {1,})
? | matches zero or one times (equivalent to {0,1})
{n} | matches exactly n times (equivalent to {n,n})
{n,} | matches n or more times
{n,m} | matches at least n but no more than m times

Non-greedy:

Metacharacter | Meaning
*? | matches zero or more times
+? | matches one or more times
?? | matches zero or one time
{n}? | matches exactly n times
{n,}? | matches at least n times
{n,m}? | matches at least n but no more than m times

Metacharacters - Subexpressions

Parenthesis "()" can also be used to group characters for use with iterators and backreferences (discussed below). (bey){4,5} will match between 4 and 5 instances of "bey". (abc|[0-9])* will match any combination of "abc" and the digits 0 to 9. Eg. "abc5", "679abc" and "abc77abc".

Metacharacters - Back References

Each sequence of characters which is matched within a "()" will be saved as a subexpression, which you can refer to later with \1 to \9, which refer to the subexpressions from left to right. b(.)\1n will match "been" and "boon", but not "bean", "ben" or "beeen".

Modifiers

Modifiers allow changes to the matching behavior from that point on. If the modifier is contained within a subexpression, it affects only that subexpression. Use (?i) and (?-i) to control the case sensitivity of matching.

Examples:

(?i)Beyond Compare | matches both "Beyond Compare" and "beyond compare"
(?i)Beyond (?-i)Compare | matches "Beyond Compare" and "bEyOnD Compare", but not "beyond compare"

See also

Regular Expressions Rename

Sample Regular Expressions


Renaming Files

Regular Expression Renames

To rename files using Perl-compatible Regular Expressions, select one or more files in the Folder Viewer and select Rename Rename from the Actions menu. In the Rename dialog select Regular expressions. In the Old mask field, enter a regular expression that is matched against the original filename. In the New mask Field, enter a template used to generate a new filename.

A template is the expression used with the regular expression defined in the old name field to create a new filename.

Example - Partial Name Change:

If "ABCDEF" is the file name, and you want to change "CD" to "HJ", enter "CD" in the Old mask field and "HJ" in the New mask field. The new filename will be "ABHJEF".

Example - Complete Name Change:

If "Beyond" is the file name, and you want to change it to "Scooter", enter ".*" in the Old mask field and "Scooter" in the New mask field.

You can also change the filename by entering "Beyond" in the Old mask field and "Scooter" in the New mask field. However, for simple renames, it's easier to use a the DOS compatible option.

Example - Changing a group of filenames

If you have a group of text files with six-letter names, and you want to swap the first three and the last three letters, enter "(...)(...).txt" in the Old mask field and "$2$1.txt" in the New mask field. In this case, "beyond.txt" becomes "ondbey.txt".

Another example is if you have a group of music files that are titled "Artist-Song" and you want to change them to "Artist - Song", enter "-" in the Old mask field and " - " in the New mask field.


Sample Regular Expressions

Expression | Meaning
^abc | Match "abc" at beginning of line
abc$ | Match "abc" at end of line
^abc$ | Match the line "abc" exactly
^\s*abc | Match "abc" at beginning of line, but allow leading whitespace
^\s*end;?\s*$ | Match a line containing only "end" or "end;" with leading or trailing whitespace
abc|def | Matches either "abc" or "def"
a(b|c)d | Matches "abd" or "acd"
a(b|c)d\1 | Matches "abdb" or "acdc", but it does not match "abdc"

Control characters used in above samples

Character | Meaning
^ | Beginning of line
$ | End of line
\s | Whitespace (a tab or space)
* | Zero or more of the preceding character
? | Preceding character is optional
| | Alternative expression
( ) | Subexpressions
\1 | Back reference to 1st subexpression

See also

Regular Expressions


Customizing Beyond Compare

Beyond Compare is highly configurable, and it sometimes can be hard to know where to go in the program to change a specific setting. Here's where to look:

Program Options

General user preferences are set in the Options dialog. From the Tools menu, select Options. From here you can set startup options, control confirmation messages, and customize display colors and fonts.

Commands

You can define your own keyboard shortcuts and toggle the visibility of various toolbar and menu items. From the Tools menu, select Customize Commands.

Session Settings

Most of the options that define the scope and rules of a comparison can be found in the Session Settings dialog. Each session type has its own session settings dialog.

Select Session Settings from the Session menu to open the dialog, or simply click the Rules Rules icon on the toolbar.

File Formats

The File Formats dialog manages the list of file types that Beyond Compare recognizes.

From the Tools menu, select File Formats.

File Formats determine:

· The type of viewer used for visual comparison
· What conversion, if any, should be performed before and after comparison
· The syntax, or grammar, of the file's content
· Tab stops
· Which grammar elements are important or unimportant to the comparison
· Line weights to help the alignment process

Tweaks

Tweaks are advanced or obscure program options that we have decided not to include in the normal user interface.

Press Ctrl+Shift+T to access the Tweaks dialog.

Editing tweaks should be self-explanatory. Contact Scooter Software if you require assistance.


Where settings are stored

Where Settings are Stored on your Computer

In a normal installation, Beyond Compare stores your preferences, sessions and customized file formats as .xml files in a Scooter Software subfolder of the Application Data folder. The location depends on your version of Windows. For instance, under Windows Vista it would be:

C:\Users\<username>\AppData\Roaming\Scooter Software\Beyond Compare 3

Notice that this location differs for different users on the same computer.

A quick way of finding this location is to select Support from the Help menu and click the Explore settings folder link at the bottom of the dialog.

Portable installation

If you prefer a more portable installation with the program and settings all in one location, you can copy your setting files to the same folder as the program. That folder may be the default program folder ("C:\Program Files\Beyond Compare 3"), or perhaps a folder on a USB flash drive or a CD-ROM. Single directory mode allows you to share one set of settings for all users on a computer, or take your settings with you. If you don't have existing settings files to copy, you can create an empty file named settings.xml in the directory.


Moving BC to Another Computer

To copy or move Beyond Compare to a different computer:

1. On the new computer, download and install the latest version of Beyond Compare.
2. Enter your registration key in the new installation.
3. Run BC on the old computer and from the Tools menu choose Export Settings to save all desired settings in a file.
4. Copy this settings file to the new computer.
5. Run BC on the new computer and from the Tools menu choose Import Settings to load the settings file.

Note Note If you have Beyond Compare version 2.0 or older on the old computer, you will not have an Export Settings command. You can contact Scooter Software for assistance in transferring your settings.

See also

Exporting Settings

Importing Settings


Sharing Sessions

Multiple users can share read only sessions by using a shared sessions file. From the Tools menu, choose Export Settings to create an .xml sessions file with any subset of your sessions.

To access a shared sessions file

1. From the Tools menu select Options.
2. On the General page, enter the location of the Shared sessions file.

Shared sessions will then appear as a new branch in the saved sessions tree:


Support, Ordering and License

Please send any comments, suggestions or bug reports to:

support@scootersoftware.com

Visit our support forum at:

www.scootersoftware.com/forum

For the latest version of Beyond Compare and for other news about the program, visit our web site at:

www.scootersoftware.com

Access our online FAQ and Knowledge Base articles at:

www.scootersoftware.com/kb


Reporting Problems

If you have found a problem with Beyond Compare, we would like to hear from you!

From the main Folder Viewer window, select Support from the Help menu, and follow the instructions to produce a report of your program and system settings. Paste the report in an email to us, and include a description of the problem.

You may want to include a screenshot that illustrates the problem. If you do, follow these steps to make one small enough to email:

1. Press ALT+PrintScreen to place a snapshot of the current window on the clipboard.
2. Open the Microsoft Paint program (Start > Programs > Accessories > Paint) and press CTRL+V to paste the image.
3. Select the part of the image that you would like to send.
4. Pick Copy To from the Edit menu, change Save as Type to either 16 Color or 256 Color, and enter a filename.
5. If possible, use a zip utility to compress the image file.
6. Attach the image file to your email to us.


Ordering and Licensing

Ordering and Licensing Beyond Compare

The single user license fee for Beyond Compare is $30 (US dollars) for the Standard edition and $50 for the Pro edition. The Windows and Linux versions are licensed separately. For current information on multi-user discounts and upgrade policy, please visit our on-line shop at:

www.scootersoftware.com/shop

If you need help ordering Beyond Compare, contact us at:

sales@scootersoftware.com

For our mailing address and other contact information, visit:

www.scootersoftware.com

See also

License Agreement


License Agreement

Your use of Beyond Compare is governed by the following Terms and Conditions:

Acceptance of License Agreement

You should carefully read the following terms and conditions before using Beyond Compare 3 (the "Software"). Unless you have a different license agreement signed by Scooter Software, your use of this software indicates your agreement to these terms and conditions. If you do not accept all of these terms and conditions, you must cease using the Software immediately.

Copyright

Customer acknowledges that the Software, License Key and accompanying user documentation ("Documentation") are copyrighted works owned by Scooter Software and that Customer has no rights in the foregoing except as expressly granted herein.

Free 30-Day Trial

This is not free software.

Scooter Software hereby grants you a non-exclusive, non-transferable, limited licensed to use the Software free of charge for a period of thirty (30) days. Use of the Software beyond the thirty-day (30-day) trial period requires the purchase of a License Key as described below. Use of the Software beyond the thirty-day (30-day) trial period without purchase of a License Key is a violation of U.S. and international copyright laws.

License Key

A unique key that will allow you to use the Software beyond the thirty-day (30-day) free trial period ("License Key") may be purchased from the Scooter Software website, which is currently http://www.scootersoftware.com. License Keys may be purchased for single or multiple users, and are priced according to the price list on the Scooter Software website. Upon purchase of a License Key, Scooter Software hereby grants you a non-exclusive, non-transferable license to use the Software as follows:

Personal License Key: A single-user ("Personal") License Key may either be used by a single user who uses the Software personally on one or more computers, or installed on a single computer used by multiple people, but not both.
Multi-User License Key: A multiple-user ("Multi-User") License Key may be purchased based upon either (a) the number of users who have access to the Software on any number of computers, or (b) based upon the number of computers on which the Software will be installed for use by any number of users. You may not use the Software in excess of either (a) the number of purchased users or (b) the number of purchased computers, whichever is applicable. A Multi-User License Key may not be used by your subsidiary companies, customers, or any other third parties.

You shall be responsible for maintaining the License Key in a safe location and are specifically prohibited from distributing the License Key, intentionally or unintentionally, to any third party. Upon loss or distribution of the License Key, Customer shall be required to pay a reinstatement fee at Scooter Software's discretion.

Distribution of the Software

Provided that you do not copy or distribute the License Key, and you include a copy of this License Agreement, you may (a) make copies of the Software; (b) give exact, unmodified copies of the Software to anyone; and (c) distribute the Software in its unmodified form via electronic means. You are specifically prohibited from charging any fees for any such copies or distributions.

Term and Termination

You may continue to use the Software for as long as you comply with the terms and conditions of this License Agreement. Scooter Software may terminate this License Agreement immediately upon notice to you in the event that Scooter Software has reason to believe you have breached this License Agreement. Upon termination, you shall immediately cease all use of the Software, License Key and Documentation and shall not be entitled to a refund of any fees paid.

Governing Law

The validity and interpretation of this Agreement shall be governed by the laws of the United States of America and the State of Wisconsin. Customer agrees that the federal and state courts located in the State of Wisconsin, Dane County, shall be the appropriate site of venue for actions relating to this Agreement, and hereby consents to the exclusive jurisdiction and venue of such courts.

Disclaimer of Warranty

THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS." TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, SCOOTER SOFTWARE DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. ANY LIABILITY OF SCOOTER SOFTWARE WILL BE LIMITED EXCLUSIVELY TO REFUND OF THE PURCHASE PRICE.


Glossary

Base folder

The top-most folder on either side of the Folder Compare view. Base folder names appear in the toolbar path edits above each pane of the comparison.

CRC

(Cyclic Redundancy Check) is a numeric representation of the contents of a file. If the CRCs of two files are different, then the contents of those files must be different. If the CRCs match, then it is quite likely that the contents match.

CSV

CSV (Comma Separated Values) is a common file format for representing row and column data.

File Format

Our term for the collection of settings that characterize a type of file. For example, the Java Source file format describes the Java grammar for syntax highlighting and rules-based comparisons, and stores your tab stop preference for Java source. File formats can also specify conversion routines to be run before and after comparisons.

Filter

A setting that limits what is displayed or processed, "filtering out" unneeded content.

Folder Viewer/Directory Viewer

The main window that compares folders side-by-side.

File Viewer

The secondary window that compares text files side-by-side.

Important text

Text that is important to the comparison.

Orphan

In a side-by-side comparison, an orphan is an item that is on one side and not the other.

Plug-in

Software accessory that can be 'plugged into' the program for more features.

Regular Expressions

Formulas for matching strings that follow a pattern.

Rules

Our term for the session settings that control how a comparison is performed.

Session

Our term for a comparison task, such as comparing folders or files. Each session view is in its own top-level window, or tab on a window.

Skew tolerance

The number of lines BC will search forward and backward for a matching section.

Snapshot

A custom BC file that contains folder tree information. Like a camera capturing reality at a moment in time, a snapshot file captures the state of a folder so that the user can compare it to the live folder at some later time, and find what has changed.

Thumbnail view

In file comparison windows, the (optional) panel on the left with the color-coded summary of differences.

Timestamp

A timestamp is a file or folder's last modified time.

Touch/Touching

The action of setting the timestamp of a file to a specific value.

Unimportant differences

Differences in text that are defined to be unimportant to the comparison. They may include whitespace or character case differences, comments or line numbers.

Whitespace

The blank space at the beginning and end of lines and between words. Whitespace is generally made up of any combination of the 'space' and 'tab' characters.

Zip archive/zip file

A set of files or folders, compressed into a single archive file. There are different archive formats, but zip is the most common. Beyond Compare supports several different archive formats.


3-way Merge Basics

A merge session helps you combine separate sets of changes into a new version of the data, accommodating both sets of changes.

Consider first a simple 2-sided comparison, where an item is on one side and not the other. The software can't tell if the item was newly added on one side, or if its pair was deleted from the other side:

However, when there is an older copy of the data available there is more information to base merge decisions on. For example, to decide whether an item was added on one side or deleted on the other, we can refer to an older copy of the data:

In this situation, the program can help you quickly and accurately combine independent modifications. This is called a 3-way merge.

For example:

Scenario #1: I have two copies of a file, one on my desktop PC and the other on my laptop. I made independent modifications to each copy, and now I need to merge those changes together.

Scenario #2: Some time ago, I installed version 1.3 of some forum software. I configured the source code to work on my website, and over time customized it to meet my needs. Now the vendor has released version 1.4 with urgent security fixes and I need to upgrade quickly, without losing my changes.

Scenario #3: At work I'm part of a development team that uses a version control system (VCS) to manage our project. I need a merge tool to resolve conflicts between my code and other's.

To apply this concept to scenario #2 above, the older, common ancestor copy would be version 1.3 of the source code, from before you made your changes. (You did save a copy of it, didn't you? :) ) On the left side is your copy of v1.3 containing your customizations, and on the other side is the new v1.4 release.

[screenshot of 3-way directory compare with merge output]

Regarding scenario #3, many VCS products will let you configure Beyond Compare as the interactive merge tool. When you check in your changes, the VCS will look for conflicts with other people's changes, and launch BC for you to resolve the conflicts.

What about scenario #1? Since you made both sets of modifications, if they are fresh in your mind you probably won't have trouble combining them accurately. In this case, having an older copy of the file isn't as important. A 2-way merge is simply a 3-way merge without the benefit of a common ancestor.

[screenshot of a 2-way text comparison with merge output]

The changes might conflict, particularly when independent changes were made in the same area; and these conflicts must be resolved.


 Attributes

Attributes

Actions > Attributes

On the Actions menu, the Attributes command modifies various operating system attributes of the selected files and folders.

For Windows file systems, the DOS attributes (Read-only, Hidden or Archive) are modified. You cannot modify the System attribute.

For Unix file systems, the owner and group access permissions are modified.

If a folder is selected, its attributes are modified but not those of its contents. To modify the attributes of folder contents, you need to expand the folder and select the contents.

The check boxes initially show the current state of the selected items. If a box is unchecked, then that attribute is disabled on all the selected files. If a box is checked, that attribute is enabled on all the selected. A gray checked box indicates that some files have the attribute and others don't.

Uncheck a box to clear that attribute from all selected files, or check it to set the attribute.


 Backup options

Backup Options

Tools > Options > Backups

Backup options

Beyond Compare can create a backup of your files before overwriting them during a copy or move operation, or before saving an edited file. Set these options to control how backup files are named and where they are stored.


Compare in Viewer

If a single file is selected, Beyond Compare will load that file into the associated viewer, and if one exists, the file across from it, too. If two files are selected, they are loaded into the File Viewer together, ignoring any files across from them.

To compare files with different names, click the first one, hold down CTRL and click the second one, and then select Compare in New View.


 Folder Compare confirmations

Folder Compare Confirmations

Tools > Options > Folder Views > Confirmations

Confirmations:

By default, Beyond Compare prompts for confirmation before performing various actions. Unmark any of these check boxes to suppress the confirmation dialogs.

The Beep after long file operations option causes an audible sound when file operations such as copy and move are complete, unless they take less than 3 seconds.

Sync confirmations:

Select Prompt, Yes to All or No to All to control confirmations that might appear during a Folder Compare session's synchronize command.

How actions are limited by filters:

By default, file filters and display filters are respected during file actions (such as Copy, Move and Delete), unless Suppress Filters SuppressFilters is on. To change the default behavior, mark the Include hidden items by default box.


 Copy

Copy

Actions > Copy

On the Actions menu, the Copy CopyRight command copies the selected files and folders from one side of the Folder Viewer to the other, overwriting any existing files on the target side.

If a folder is selected, only its filtered contents will be copied (same as if the folder was expanded and all visible contents selected). However, if an open folder is selected and any of its children are selected as well, then the folder's selection is ignored and only the selected children will be copied.

By default, a confirmation dialog appears before the copy. To skip the confirmation, open the Tools menu, click Options Options, go to the Folder Views > Confirmations page, and disable Confirm file copy.


 Copy to Folder

Copy to Folder

Actions > Copy to Folder

On the Actions menu, the Copy to Folder CopyTo command copies the selected files and folders to a given folder, optionally with the path intact. You can select items on one side of the Folder Viewer or the other, but not both.

If a folder is selected, only its filtered contents will be copied (same as if the folder was expanded and all visible contents selected). However, if an open folder is selected and any of its children are selected as well, then the folder's selection is ignored and only the selected children will be copied.

When you select Copy to Folder, you can make the target a .zip file. If the .zip file does not exist, BC will create a .zip file for you.

Path Options Example

In this example, three items are selected: The file 10.txt, the folder Q and the file 30.txt.

The pictures below show how the items look in the target folder, using each of the three available path options.

Keep Relative Folder Structure Determines the minimum difference between all of the selected files' paths, and creates that in the target folder. In this example, folders D and P were not selected, but they were created in the target folder in order to keep the same relative structure.

Keep Base Folder Structure Creates the entire path (back to the base folder) in the target folder.

Don't Keep Upper Folder Structure Ignores all path information and copies all selected files and folders into the target folder together. In this example, only the Q folder was created in the target folder, because it was specifically selected.


 Customizing commands

Customizing Commands

Tools > Customize Commands

In this dialog you can control which commands appear in menus and on toolbars, and you can set keyboard shortcuts for commands. Since the menus and toolbars change depending on the type of window, you need to open a session to customize the commands for that session type.

In the Search search field, type the name or description of the command you are looking for in order to limit the list of commands.

Select a command in the list to edit. The command's description will appear below the list.

For most commands, you can enable or disable Show command in menu and/or Show command on toolbar. Some commands also have a Show command on dropdown option that positions the command on a drop-down menu connected to a toolbar button.

To change the keyboard shortcut, focus on the Shortcut field and press the desired keystroke. Click Remove to remove an assigned shortcut or Default to revert it to the factory default setting. If a keyboard shortcut is already assigned elsewhere, a warning appears and you have the option of reassigning it.

Most session types have display filters commands available. For those, Display filter presets are available for quickly selecting popular toolbar layouts (DropDown, Favorites or Toggles). These presets can also be selected by right-clicking the toolbar.

Enable Lock toolbar positions to disable drag-and-dock on the toolbar.


 Setting Data Compare columns

Data Comparison Column Definitions

Session > Session Settings > Columns

Each line in the grid represents a column of the comparison, and shows:

· A key icon for key fields
· The column number and name for the comparison display
· The Left file column number and sample data if present
· The Right file column number and sample data if present
· A summary of the column's Handling criteria

To modify the column alignment:


 Data Compare options

Data Compare Options

Tools > Options > File Views > Data

This page allows you to customize the Data Compare.

The Details resize columns to fit option causes the Row Details area at the bottom of the comparison to size columns to fit the specific lines displayed there, rather than matching the column widths in the main comparison display.


 Data Compare session settings

Data Compare Session Settings

Session > Session Settings

To edit the rules that control a data comparison:

1. In a Data Compare session, from the Session menu choose Session Settings.
2. Click the tab containing the settings you want to edit.

Specs

Format: Specify the File Format to be used when reading the left and/or right files. The default selection is Detected, which means the File Format will be selected based on file masks.

Columns: Controls column alignment, key columns, column types and tolerances.

3. The drop-down selection at the bottom of the dialog controls the scope of your changes. Select Use for this view only to affect the current session, or Update session defaults to apply your changes to all new sessions of this type.

Additional choices are shown if the data comparison is a child session spawned from a folder comparison. Use for these files within parent session causes the current folder comparison to remember the sessions and use them whenever this particular pair of files is compared. Use for all files within parent session causes these rules to be used for other data comparisons originating from the current folder comparison.

4. Modify the desired settings, and then click OK.


 Delete

Delete

Actions > Delete

On the Actions menu, the Delete Delete command deletes the selected files and folders from one or both sides of the comparison.

If a folder is selected, its entire contents are deleted, regardless of file filters or display filters in effect. If an open folder is selected and any of its children are selected as well, then the folder's selection is ignored and only the selected children will be deleted.

Enable the Use recycle bin if possible option to move files and folders stored on a local drive to the recycle bin instead of being completely removed. This option is ignored for deletions from network drives, FTP sites and within zip files.


Display Filters

Display Filters limit the view to certain comparison results. For example, you can pick Show Differences FavDiff to hide all the matching files so that you can concentrate on the mismatches. The current display filter choice will be saved whenever you leave a session, unless that session is locked.

Most of the session types have some sort of display filter implementation. The examples below are from a Folder Compare session.

Right-click on the toolbar to pick one of three built-in ways to show Display Filters on the toolbar: DropDown, Favorites or Toggles. Or, use Tools > Customize Commands to create your own custom layout.

DropDown layout

DropDown is the default style for the toolbar, designed for simplicity and to save space on the toolbar.

The buttons represent Show All FavAll, Show Differences FavDiff and Show Same FavSame. The drop-down on the middle button lets you pick a different combination display filter.

Favorites layout

The Favorites style includes various filter combinations on the toolbar.

Toggles layout

Toggles represent the individual comparison states.

Select this mode when you want combinations that are not available with the other display filters. For example, the Toggles shown above will display Left Orphans and Right Newer, and nothing else.


Editing a Data Format

Click the tab containing the settings you want to edit:

General

Conversion

Type


Editing a Grammar Item

Select an existing Element name from the dropdown list or enter your own new name.

To specify a simple grammar element:

Select the Basic category. Enter a Text matching string and specify if the string should exactly Match character case and whether the string is a Regular expression.

For an element that is defined by delimiters:

Select the Delimiter category. Specify starting and ending delimiters, or a starting delimiter and the Stop at end of line option. Specify if the delimiters should exactly Match character case and whether they are Regular expressions.

An Escape character can be specified that allows the ending delimiter character to be embedded in the element.

For example, the colored literal string in the following code is delimited by apostrophes ('), with backslash (\) as the escape character:

s = 'I can\'t see straight'

To enter a list of grammar tokens:

Select the List category and type the tokens into the memo control. Specify if the tokens should exactly Match character case and whether they are Regular expressions.

To define an element as a column range:

Select the Columns category. Specify the starting and ending column numbers, or a starting column and the To end of line option.

To match on repeating page headings in your data:

When comparing report output, a single change can shift all subsequent page headings, causing many addition differences. You can define a page heading grammar element in order to ignore these differences. Select the Lines category. Enter a Text matching string that will match the heading at the top of each page in your data. Typically this would be the Form Feed character. Mark the or line 1 box if the first page doesn't start with the Form Feed character. Set and next xxx lines to the number of lines in the heading. Specify if the match string should exactly Match character case and whether the string is a Regular expression.

To define case-sensitivity:

Enable This element is case sensitive to indicate that changes in character case are important differences during comparison.


Editing a Text Format

Click the tab containing the settings you want to edit:

General

Conversion

Grammar

Misc


 Exclude

Exclude

Actions > Exclude

The Exclude command on the Actions menu excludes the selected files and folders from the current session. It is a handy alternative to opening the File Filters dialog and entering file/folder exclusions.

If you select one or more files of the same type, the Exclude command will offer to exclude all files of that type.

To remove an exclude, click the file filters icon Filters and remove the entry from the Exclude files (or Exclude folders) list.


 Exporting settings

Exporting Settings

Tools > Export Settings

You can selectively save your program settings, in order to transfer them to another computer, upgrade to a newer version, or share them with another Beyond Compare user.

To export your settings:

1. On the Tools menu, select Export Settings.
2. Select the type of settings you wish to export:

Program options include your preferences that you set in the Options dialog.

Program state includes things like window positions and MRU lists.

Sessions include some or all of your named sessions.

File Formats include some or all of your customized File Formats.

FTP profiles include some or all of your FTP settings.

System info includes information about your computer and your Beyond Compare installation. It is useful for support purposes, to help us debug problems.

3. If you are exporting sessions, file formats, or FTP profiles, click Next to pick the specific named items to be included.
4. Click Finish to export the settings. If you are exporting a single type of settings, an XML file will be created. Otherwise, a zip file containing XML files will be created.


 File Compare colors

Comparison Colors for File Views

Tools > Options > File Views > Compare Colors

These options allow you to customize the colors used to highlight differences in the various types of file comparison sessions.

Set Important differences and Unimportant differences to your preference for those concepts. The font colors and background colors will be derived from these basic colors. By default, the basic color is used for the text color on differences, and a pale version of the color is used for the entire line's background color.

Click the bold button [B] to use a bold font style for differences.

Adjust the Background Contrast slider to make the background colors lighter or darker overall.

The Difference Enhancer slider controls foreground/background contrast for individual differences.

Mark the Use merge colors for compares checkbox to color one-sided lines as left or right additions (blue and purple) rather than differences (red).

Pick a basic color for indicating Left changes, Conflicts and Right changes. These colors will be used for icons and the thumbnail summary. Derived colors will be used for the background color on appropriate lines. For each of these colors there is a Shift Unimportant Color slider that modifies the hue used for unimportant differences. There is also an Additional Contrast slider that further lightens the unimportant color.


 File View display options

Display Options for File Views

Tools > Options > File Views > Display

These options allow you to customize visual aspects of the various types of file comparison sessions.

Select an element from the list to change its visual treatment. You can change the Background color and Text color of each element on the list. Lower elements in the list override higher ones. Select Default to leave unchanged a color set by an element higher on the list.

Mark the Use Stripes checkbox to tint the background on every other line of the comparison.

By default, Beyond Compare uses a medium green color for selected text, so that difference coloring is not obscured. If you prefer the standard Windows coloring for selections, pick Selection from the list of elements and change Text color to Highlight text, and the Background color to Highlight Background.

The list also includes syntax highlighting elements.

Click one of the Font buttons to change the overall font used to display text. The Editor font is used in Text Compare, Text Merge and Data Compare views. Hex font is used in Hex Compare sessions, as well as the optional hex details display at the bottom of other views. The Listing font is used for items in a Version Compare or MP3 Compare session.

The Dim inactive pane by ... % setting is used to darken the non-active side of the comparison, to help you focus on the active side.


File Masks

A file mask is a pattern of characters and wildcards used to match folder and file names.

Example: *.* would match any filename. For historical reasons, it even matches files that don't have an extension.

Example: *.html would match any HTML filename.

Wildcards

Wildcards allow a file mask to match multiple folder or file names.

? Matches any single character.

* Matches zero or any other amount of characters.

[az] Matches one of the characters within the set, a or z.

[a-z] Matches any characters within a range, from a to z.

[!az] Matches any characters not in the set, not a or z.

Example: A? would match A followed by any single character.

Example: A* would match A followed by any amount of characters.

Example: [a-z0-9] would match any number or letter.

Example: [!ac-g] would match any character except for a, c, d, e, f, and g.

Simple file masks

Simple file masks will affect any files or folders whose parent folder is included. The base folder is always included. All folders which contain included files are also included.

To exclude rather than include the specified items, add a minus sign (-) in front of a file mask in the Filters field. In the File Filters dialog, place the file mask in the Exclude field rather than using the minus sign.

f Include any file named f.

p\ Include any folder named p.

-f Exclude any file named f.

-p\ Exclude any folder named p.

Example: *.pas;*.dfm;*.dpr would include only files with extensions pas, dfm, or dpr.

Example: Source\ would include only folders named Source and their subfolders.

Example: -*.dcu;-*.ddp would exclude files with extensions dcu, or ddp.

Example: -Backup\ would exclude folders named Backup.

Relative file masks

Relative file masks affect files or folders in specific locations.

p\f f must be in folder p.

.\f f must be in the base folder.

...\f f may have zero or more parent folders.

Example: Windows\*.txt would affect any text file in any included folder named Windows.

Example: ...\Windows\*.txt would affect any text file in any folder named Windows.

Example: .\Windows\*.txt would affect any text file in a folder named Windows that is in the base folder.


 File Compare options

File View Options

Tools > Options > File Views

Thumbnail control for large files

Select Compress to fit to compress the thumbnail to the available vertical space. Select Allow scrolling to show a vertical scrollbar instead.

Viewable in web browser

Specifies file types that can be viewed in a browser. File compare sessions will offer the Open With Web Browser command for these files.

Displayed files changed externally

Mark the Check for files changed on disk box to check for a newer copy of a file when returning focus to a file compare session. If found, Beyond Compare will prompt "File changed on disk, reload?" Mark the Automatically reload unless changes will be discarded box to have BC automatically load the newer file as long as you haven't made changes to the displayed file.


 Setting name filters

Filter by Name

Session > Session Settings > Filter by Name

You can include or exclude folders and files based on their names by using one or more file masks.

To set a name filter:

Add a file mask to the appropriate list. Each file mask must be on its own line.

· Include Files Files to include in this session.
· Exclude Files Files to exclude from this session.
· Include Folders Folders to include in this session.
· Exclude Folders Folders to exclude from this session.

For examples, see the File Masks topic.

To clear all Name Filters:

Click the Clear button to clear all the filter settings on this tab.


Find

To locate specific text in a text or data comparison, select Find Find from the Search menu.

Text to find

Enter the text to search for.

Match character case

Match only text with the same uppercase and lowercase characters.

Whole words only

Match on the whole words but not parts of words.

Regular expression

Indicates the search string is a PCRE regular expression. You can use the dropdown button to the right of the search string to insert common regular expression elements. Click the RE Examples button for more info.

Wrap search

When one end of the file is reached, continue searching at the other end.

Search up

Searches backwards, towards the top of the comparison.

Sides

Specify the sides of the comparison to search.

Close automatically

Close the dialog immediately after clicking the Find button. Use the Search menu's Find Next and Find Previous commands for finding additional occurrences of the search string.


 Overriding Folder Compare alignment

Advanced Folder Comparison Settings

Session > Session Settings > Misc

In the absence of alignment overrides, a Folder Compare session aligns files and subfolders by name, left and right. You can manually change the default alignment.

To force a different alignment:

Click New to add an alignment override.

In the Alignment Override dialog, fill in the Align left file (folder) and with right file (folder) fields. You can use * and ? wildcards in your entries, or enable Regular expression to interpreted your entries as replacement-style regular expressions. Limit to this folder specifies the relative path for the alignment.

Examples:

Align left file (or folder) | ... with right file (or folder) | Description
apple.gif | apple.png | Lines up "apple.gif" with "apple.png"
*.gif | *.png | Lines up all GIF files with PNG files of the same name.
IMAGE_*.jpg | My Vacation *.jpg | Lines up files such as IMAGE_01.jpg and IMAGE_02.jpg with "My Vacation 01.jpg" and "My Vacation 02.jpg"

Note Note The easiest way to manually align two items in a Folder Compare is to right-click the first item, select Align With, then click the second item.

To override file format associations:

The Enabled file formats list lets you override which File Formats will be used by this Folder Compare session. You can create a custom File Format that is enabled for use this session but disabled in the global list.


 Folder Compare colors

Comparison Colors for Folder Sessions

Tools > Options > Folder Views > Compare Colors

These options allow you to customize the colors used to highlight differences in Folder Compare and Folder Sync views.


 Setting Folder Compare criteria

Folder Comparison Criteria

Session > Session Settings > Comparison

These settings control what is considered a difference in a Folder Compare session.

Quick tests

These comparison tests can be performed simply by reading directories and are much quicker than tests that require reading individual files.

Compare file size

Marks files as different if file sizes differ.

Compare timestamps

Compares files' date and time last modified. Timestamps must differ by more seconds than the Tolerance to be considered mismatches.

Ignore daylight saving difference ignores exact hour differences. This is useful for dealing with the way that different file systems handle Daylight Savings Time.

Ignore timezone differences ignores timestamp differences that are multiples of an exact hour.

Compare file attributes

Archive compares files' archive attribute. Since merely copying a file can change its archive attribute, you should normally disable this option.

System compares files' system attribute.

Hidden compares files' hidden attribute.

Read-only compares files' read-only attribute.

Tests that require reading files

Compare contents

Enables size or content-related comparisons.

CRC comparison compares CRC values. A CRC (Cyclic Redundancy Check) is a numeric representation of the contents of a file. If the CRCs of two files are different, then the contents of those files must be different. If the CRCs match, then it is likely (but not certain) that the contents match.

Binary comparison compares files byte-by-byte.

Rules-based comparison compares files based on rules definitions. Allows you to ignore differences in line termination, whitespace, or source code comments.

Enable Skip if quick tests indicate files are the same when you only want to perform the slower, more thorough tests when timestamps are different.

Compare versions

Compares version information, typically stored in application files (.exe, .dll, .ocx, etc).

Override quick test results If enabled, a content comparison that finds identical contents will show the files as matching, even though there are differences in timestamps or other quick tests.


 Setting Folder Compare handling

Folder Compare Handling

Session > Session Settings > Handling

Folder handling

Automatically scan subfolders in background causes folders to be read in the background when a comparison is loaded. This way, folders can be colored appropriately before you open them. Top-level orphan folders can usually be colored and filtered without scanning, since they can only contain other orphans. Automatically scan top-level orphan subfolders causes these orphan folders to be scanned anyway, so that the folder's size is accurately reported.

Expand subfolders when loading session opens all folders automatically when a comparison is loaded. Only expand subfolders with differences limits auto expansion to folders that are found to have mismatches.

Archive handling (eg. zip files)

As files always treats archive files like other files. They will sort with files and not show a folder icon.

As folders once opened sorts and compares archive files like other files, but with a zip folder icon. Once you open the zip folder, its comparison status changes to reflect its contents, like other folders do.

As folders always treats archive files like regular folders.

File handling

Touch local files when copying to an FTP site

Many FTP sites do not allow BC to control file timestamps, so when a file is copied to the FTP site, its date will not match the local copy. This option changes the local file timestamp to match the FTP copy.

Maintain DOS 8.3 aliases

Try to keep the same short (DOS 8.3) filenames when copying files.

Copy NTFS file permissions

Copies security descriptors of files on NTFS file systems under Windows 2000 or newer. This feature does not preserve permissions of files edited from Text Compare sessions.

Bypass disk cache during binary comparisons

Reads files directly from the media, avoiding Windows' disk cache. This ensures an accurate comparison after copying to questionable media.

Automatic refresh

Set this option to periodically refresh the folder comparison.


 Folder Compare log options

Folder Compare Log Options

Tools > Options > Folder Views > Log

Set these options to include or exclude types of messages in the log:

Operation summaries

Log a summary of each operation.

Operation details

Log details of each operation, including each file affected.

Warnings

Log warnings and errors.

FTP trace

Log messages to and from FTP site.

To limit the memory usage of the log:

Enter a value for Display up to ... messages. Once this limit is reached in a session, the oldest messages will be deleted.

To continuously write log messages to a text file:

Enter a file specification for Automatically save messages to file. The file will be created if neccessary


 Folder Compare options

Folder Session Options

Tools > Options > Folder Views

Filter presets

Specifies the preset filter choices, available on the Folder Compare's toolbar. Use simple wildcard definitions separated by semicolons. To include a description, be sure to enclose the filters in parenthesis. Example:

HTML source (*.htm;*.html;*.jpg)

Archive associations

Specifies the file types to be associated with each of the supported archive formats. Select a format and enter the associated file types separated by semicolons in the Mask for Zip field. You can leave the field blank to drop support for that format.


 Folder Compare session settings

Folder Compare Session Settings

Session > Session Settings

To edit any settings specific to a folder comparison session:

1. In a Folder Compare view, from the Session menu choose Session Settings.
2. Click the tab containing the settings you want to edit:

Specs

Comparison

Handling

Filter by Name

Other Filters

Misc

3. The drop-down selection at the bottom of the dialog controls the scope of your changes. Select Use for this view only to affect the current session, or Update session defaults to apply your changes to all new sessions of this type.
4. Modify the desired settings, and then click OK.


 Folder Compare display options

Folder Compare Display Options

Tools > Options > Folder Views > Display

These options allow you to customize overall colors and fonts used in Folder Compare and Folder Sync views.

Font

By default, the font used for folder displays is the same as what the operating systems uses. To change it, un-mark the Use system checkbox and click the Font button.

Selection

By default, a light green background color is used to highlight selected items. This allows the comparison colors to show even when selected. You can modify the selection color, or if you prefer, mark the Use system checkbox to use the operating system's scheme for highlighting selections.

Miscellaneous

Select the colors to be used for Filtered out items (when Suppress Filters is used), and for items whose comparison state is Unknown. Mark the Use Stripes checkbox to tint the background on every other line of the comparison.


 FTP authentication settings

FTP Profiles - Authentication Settings

Tools > FTP Profiles > Authentication

These settings apply globally to all profiles.

Annonymous logins:

Email address

When connection to anonymous FTP sites it is customary to include your email address as the password. Specify the e-mail address (real or fictitious) to use for anonymous logins.

SSH authentication:

Private key/passphrase

SSL certificate:

Note Note If you need help with the settings on this page, consult your system administrator.


 FTP connection settings

FTP Profiles - Connection Settings

Tools > FTP Profiles > Connection

These settings control how the connection is made to the remote server.

Connection settings:

Simultaneous connections

Sets the maximum number of concurrent connections (from 1 to 10) that Beyond Compare can create to this server.

Read timeout (seconds)

Sets the timeout for downloading files. The operation will fail if no bytes are received within this time.

Passive transfers (PASV)

Some firewall configurations require this setting, which modifies the methods used to transfer data back and forth between your computer and the FTP server. Not all FTP servers support PASV mode. If the connection hangs, try turning this on.

Clear control channel (SSL only)

Clear data channel (SSL only)

Proxy settings:

Use proxy

Specifies that FTP connections should use FTP Proxy protocol. If you are not on a Local Area Network (LAN) or Wide Area Network (WAN), leave this option unchecked.

Proxy type

Specifies the type of firewall

Host, Port, Username, Password

Specifies login parameters for your firewall / proxy.

Note Note If you need help with the settings on this page, consult your system administrator.


 General FTP settings

FTP Profiles - General Settings

Tools > FTP Profiles > General

These settings control general FTP behavior.

Login settings:

Set Protocol to FTP or one of the secure FTP options: SSL or SSH.

Port is initialized to a standard value based on protocol. You can override it for custom connections.

Specify Host, Username and Password for your account. Anonymous login uses an email address for your username.

Save password weakly encrypts your password and stores it along with other FTP profile settings.

Server settings:

Filenames are case sensitive

Filename must match character case in order to line up in the comparison.

Encoding

Specify the character encoding the server uses for directory listings and commands.

Time zone

Specify the time zone of the server. Timestamps will be converted to local time automatically.

Custom login commands

Specify any additional commands to sent to the server upon connection.

Note Note If you need help with the settings on this page, consult your system administrator.


 FTP listing options

FTP Profiles - Listing Options

Tools > FTP Profiles > Listings

Beyond Compare parses the plain text directory listings sent from the FTP server in order to determine the remote folder structure. Unfortunately, there is no one standard for these listings.

These settings help Beyond Compare understand the conventions and capabilities of the FTP server.

LIST options:

Use MLSD command

Requests high-resolution timestamps from server. If successful, the following settings are ignored. Soft links will be listed as plain files and directories, and listings won't be recursive.

Show hidden [-a]

Makes the FTP server include files that it wouldn't normally include, such as UNIX filenames that begin with a period.

Force long format [-l]

Attempts to change the output of the FTP server list command. Try this option if BC doesn't list any files when it loads.

Complete timestamps [-T]

Expands the timestamps that the FTP server returns to include a full date and time, including seconds.

Resolve links [-L]

Makes the FTP server list soft links as plain files and directories with the timestamp and size of the link's target.

Recursive [-R]

Makes directory listings recursive, including contents of the subdirectories in response to a single FTP list command. Recursive listings may be slower initially, but save time overall if subdirectories will need to be examined eventually.

Link resolution:

FTP sites can connect files together using symbolic "links" which point from one area of the site to another. These links do not specify whether they point to files or folders, so the following methods of resolving are available:

Fast: Requires no extra transfers. Any link which has an extension (eg. '.txt') is considered a file and all others are considered directories.

Simple: BC will attempt to change directories into every link as it encounters it. If that succeeds the link is considered a folder, otherwise it is considered a file.

Miscellaneous settings:

Fetch incomplete timestamps

Tries to fetch the file's last modified time in cases where the directory listing only reports the date. Will provide more accurate timestamp comparisons at the cost of some performance. Not supported on all FTP servers.

Hide VMS versions

Only the most recent version of a file is included and will align with a local file. Otherwise, all versions of the file are included with their version numbers.

Note Note If you need help with the settings on this page, consult your system administrator.


 FTP transfer settings

FTP Profiles - Transfer Settings

Tools > FTP Profiles > Transfer

These settings control how files are transferred to and from the FTP server.

Transfer settings:

Preserve timestamps on upload

Attempts to set the remote timestamp to match the source timestamp. Leave enabled unless it causes problems with the server.

Compress transfers (MODE Z)

Uses compression to speed up transfers when supported by the server. This may actually slow down transfers on fast connections.

Limit download (Kbps), Limit upload (Kbps)

These options limit how much bandwidth Beyond Compare consumes for each connection.

Transfer type:

FTP sites can transfer data in two ways: ASCII and Binary. ASCII is used to transfer text files which don't have any special characters. The FTP server will automatically make any adjustments to line termination needed in ASCII mode. Binary is used to transfer all other files, including pictures, music, Word documents, etc. In Binary mode, no changes are made to the file during the transfer.

Setting the transfer type to either ASCII or Binary will force all files to transfer that way. If the transfer type is Auto, Beyond Compare will automatically switch back and forth based on the file's extension. To change which files get transferred as ASCII, add and remove extensions from the ASCII types list.

Filename conversion:

Many FTP sites are case sensitive and treat files with the same names but different case as separate entities. When uploading to FTP sites, Beyond Compare can modify the filename sent to correspond to certain naming conventions. These modifications will only take place if a file of the same name, regardless of case, is not found in the target directory already.

Note Note If you need help with the settings on this page, consult your system administrator.


 General options

General Options

Tools > Options > General

These options control some of the general features of Beyond Compare.

To customize the Home view:

Enable Include session management to expose a tabbed session settings control on the Home view.

Set the maximum number of auto-saved sessions to store. Once this limit is passed, the oldest auto-saved sessions will be automatically deleted. Enter zero (0) to disable the auto-save sessions feature.

Interface options:

Edit these options to show Large buttons with text labels on the toolbars, fly-over hints for toolbar buttons or have keyboard shortcuts included in the hints.

The ESC key closes file views option applies to all file comparison session types, such as Text Compare, Data Compare and Picture Compare. It does not affect Folder Compare sessions.

Shared Sessions:

Specify a Shared sessions file. Shared sessions will appear in your session tree. You can use but not modify them. Use Tools | Export Settings to create a shared sessions file.


 How to register

How to Register

Step 1 - Try It

You can use the program free for 30 days to see if it suits your needs. If you use it beyond 30 days you are obliged to pay the license fee. Please read the License Agreement for details. If you do not register the program, it will stop functioning after 30 days of use (rather than 30 days from installation).

Step 2 - Buy It

The single user license fee for the Standard Edition is US$30, and US$50 for the Pro Edition. We have discounted pricing for multi-user site licenses. For complete instructions and links for on-line ordering, please visit our web site at: www.scootersoftware.com

Step 3 - Unlock It

Once we receive your order, we email you back with your registration key that unlocks the program. When you receive your registration key, copy it from the email message to the clipboard. Then start up your copy of Beyond Compare and choose Enter Key from the popup window that first appears, or, select Enter Key from the Help menu.

The registration key disables the "nag" screen and removes the 30 day limitation. Your registration key will work with all language versions of Beyond Compare, as well as all subsequent minor version updates.


How to unlock

How to Unlock Beyond Compare

Help > Enter Key

Beyond Compare is distributed in evaluation mode, allowing you to see if it suits your needs. Unless you register, the program will stop running after 30 days of use.

When you purchase a license to Beyond Compare, we send you an unlock key by email. It looks something like this:

--- BEGIN LICENSE KEY ---

CUgJWTb0eQVybpezCYu9CSqDLCtvx6g63hp-hrKHXiNL144KP4FTWHl9I

q4+F5RWwcpzSyX98tlDzSsJm5xvnjuvunNrAG16sjP8Dp4as1gP3M1Pkj

dmDVZXXLlyHoIrMd-Ptl0wpWPU654xu8kc7iYPl5LhOfXJG64V12vJnOm

--- END LICENSE KEY -----

1. From your e-mail program, select the key and press Ctrl+C to copy it to the Windows clipboard. It's ok if you include some of the message before and after the key, but be sure to include the entire key.
2. Then, run Beyond Compare and select the Enter Key option. (Click the Enter Key button on any of the "Evaluation" dialog boxes, or select Enter Key from the Help menu.)
3. In the "Register Beyond Compare" dialog box, your key should automatically appear in the text box. If not, try copying and pasting again.

Mark the Register for all users checkbox to store the license key in the program folder, so that all users on this computer will be registered.


 Importing settings

Importing Settings

Tools > Import Settings

You can import settings that were previously exported from BC3 or BC2.

To import settings:

1. On the Tools menu, select Import Settings.
2. Select the file containing the settings to import. It can be an XML or zip file with settings exported from BC2 or BC3.
3. If the file contains different kinds of settings, mark the checkboxes for the type of settings you wish to import:

Program options include preferences that you set in the Options dialog.

Program state includes things like window positions and MRU lists.

Sessions include named sessions.

File Formats include customized File Formats.

FTP profiles include FTP settings.

4. If you are importing sessions, file formats, or FTP profiles, click Next to pick the specific named items to be included.

An item is colored red if its name is the same as one in your stored settings. If you import a red item, it will replace your existing session, file format, or FTP profile!

Mark the Delete all existing sessions checkbox to erase all of your stored sessions before importing those in the file. Likewise, mark Delete all existing file formats or Delete all FTP profiles if you wish.

5. Click Finish to import the settings.


 Managing file formats

Managing File Formats

Tools > File Formats

From the Tools menu, choose File Formats. Here you can see and manage the entire list of file formats.

The order of the list is important. When Beyond Compare looks for a file format to use on a file, it scans this list from top to bottom, stopping on the first match in the File Types field. If an item shows in red, it means that prior items cover the file types, so the item will never be automatically selected (although you can manually select any format). To change the order of the list, highlight an item and click Move Up Up or Move Down Down.

You can temporarily disable a file format by deselecting its check box.

See also

Editing a text format

Editing a data format

Editing a picture format (At this point, picture formats do not include any options other than specifying an external conversion utility.)

Note Note A specific session can independently enable or disable file formats. (See Folder Comparison Handling.) This way you can have a special file format that is used only by one session.


 Managing FTP profiles

Managing FTP profiles

Tools > FTP Profiles

FTP Profiles hold your preferences for connecting to specific FTP servers.

...Describe management of FTP profile list; how defaults work

Click the tab for the settings you wish to edit:

General

Connection

Listings

Transfer

Authentication


Managing Workspaces

Session > Load Workspace > Manage Workspaces

A workspace is the collection of all open sessions, including the configuration of windows and tabs.

To save your current workspace configuration:

1. From the Session menu, select Save Workspace As.
2. Enter a unique name or select from the dropdown a saved workspace to be replaced.

To reload a saved workspace:

From the Session menu, select Load Workspace and pick a saved workspace from the submenu. This will close all current sessions and reopen the saved configuration.

To delete or rename saved workspaces:

1. From the Session menu, select Load Workspace > Manage Workspaces.
2. Select a saved workspace and press F2 to rename it, or DEL to delete it.

To automatically load or save workspaces:

In the Manage Workspaces dialog, you can specify a workspace name in On startup, load and/or in On exit, save as. These options can also be set in Tools > Options > Startup.


 Move

Move

Actions > Move

On the Actions menu, the Move MoveRight command moves the selected files and folders from one side of the display to the other, overwriting any existing files on the target side.

If a folder is selected, its entire contents are moved, regardless of file filters or display filters in effect. However, if an open folder is selected and any of its children are selected as well, then the folder's selection is ignored and only the selected children will be moved.

By default, a confirmation dialog appears before the move. To skip the confirmation, open the Tools menu, click Options Options, go to the Folder Views > Confirmations page, and disable Confirm file move.


 Move to Folder

Move to Folder

Actions > Move to Folder

On the Actions menu, the Move to Folder MoveTo command moves the selected files and folders to a given folder, optionally with the path intact. You can select items on one side of the Folder Viewer or the other, but not both.

If a folder is selected, only its filtered contents will be moved (same as if the folder was expanded and all visible contents selected). However, if an open folder is selected and any of its children are selected as well, then the folder's selection is ignored and only the selected children will be copied.

When you select Move to Folder, you can make the target a .zip file. If the .zip file does not exist, BC will create a .zip file for you.

Path Options Example

In this example, three items are selected: The file 10.txt, the folder Q and the file 30.txt.

The pictures below show how the items look in the target folder, using each of the three available path options.

Keep Relative Folder Structure Determines the minimum difference between all of the selected files' paths, and creates that in the target folder. In this example, folders D and P were not selected, but they were created in the target folder in order to keep the same relative structure.

Keep Base Folder Structure Creates the entire path (back to the base folder) in the target folder.

Don't Keep Upper Folder Structure Ignores all path information and copies all selected files and folders into the target folder together. In this example, only the Q folder was created in the target folder, because it was specifically selected.


New Folder

The New Folder command on the Actions menu lets you create a folder at the current position. If you have a file or folder selected, the new folder will be created with the same parent folder as the selected item.

If both sides are selected, a new folder will be created on both sides.

To create a new folder to use as a base folder, type the path for the new folder into the left or right edit controls, and press ENTER. In the warning dialog that appears, click Create.


 Next difference options

Next Difference Options

Tools > Options > File Views > Next Difference

Set these options to reflect your preferences concerning how to peruse differences.

Next difference:

When loading new files, go to first difference

Immediately positions at first difference when a new text comparison starts.

Limit "Next Difference Files" to current folder

Limit the Next Difference Files command to finding files in the same parent folder.

When no more differences:

Wrap around to first difference

If the end of the comparison is reached when looking for a difference, position back at the first difference in the comparison.

Show message panel

Disable this option in order to suppress the message panel (and beep) when a difference is not found.


 Defining "Open With" applications

Defining "Open With" Applications

Tools > Options > Open With

You can configure external applications to appear in the Open With submenu.

Click New to add or Edit to change an application.

Enter a name in the Description field to appear on the Open With menu.

To define a keyboard shortcut for the application, focus on the Shortcut field and press the desired keystroke. Click Remove to remove an assigned shortcut.

Enter a suitable Command Line specification for launching the application. It can include command line switches appropriate to that application. The following variables will be replaced with the indicated information:

%f Absolute path and filename

%l (lowercase L) Current line number in file view

%n Filename only

%p Absolute Path

%x Extension (includes '.')

%b Basename (Filename without Extension)

%F Path and filename relative to the working folder

%P Path relative to the working folder

'1' and '2' can be appended to the end of variables to refer to the left/first or right/second file (eg. "BCompare %F2 %F1"). In all cases except for a second %f or %l (for backwards compatibility), leaving a number off will refer to the first file no matter how many times it's listed on the command line.

The Working Folder field allows you to change where the program executes (the "Start in" folder). If it is blank, the program is executed in the same working folder as BC3. You can specify a specific folder, or pick the special values <parent folder> and <base folder> from the dropdown list. <parent folder> will use the selected file's parent folder, while <base folder> will use the base folder of the selected side (or the parent folder in a file view).

Use the Path Delimiter field to replace all path delimiters with the given string. If left blank, the normal delimiters will be used (eg. backslash (\) under Windows).

The Accepts File and Accepts Folders options control whether the application should be available for files, folders, or both. Tip: You can configure Beyond Compare itself as an additional application for folders. That way, you can select folders and compare them in another instance of Beyond Compare.

Refresh When Finished performs a Fast Refresh when BC is done processing the Open With list.

When the Multiple Instances option is enabled, you can select multiple files or file pairs, and execute the operation on all of them once per file or pair of lined up files. With this option, BC checks to see if a second file would be given on the command line (eg. "%x2"). If it is, the application will execute on pairs at a time, otherwise it will break the pair up and execute once for each selected item in the pair.

Wait For Previous Instance To Finish makes BC wait until the previous program finishes executing before running the next command.


 Setting other file filters

Other File Filters

Session > Session Settings > Other Filters

You can exclude files from a folder comparison based on criteria other than their names.

To filter by date:

1. Select Date from the list of filter types.
2. Choose one of these methods:
· Choose Days Ago to set the cutoff relative to the date when the comparison is run. It counts days from 12:00AM on the current system date.
· Choose Set Cutoff to set the cutoff to a particular date and time. By default, it is the last cutoff used. Use the calendar controls to set the desired date and time.
3. Select Exclude files that are older than or Exclude files than are newer than to define the filter. You can select both terms to include files within a range of dates.

To filter by size:

1. Select Size from the list of filter types.
2. Select Exclude files that are smaller than or Exclude files than are larger than to define the filter. You can select both terms to include files within a range of sizes.

To filter by DOS attributes:

1. Select DOS attributes from the list of filter types.
2. Select the options you want to control exclusion.

To filter by source control status:

1. Select Source control status from the list of filter types.
2. Select the options you want to control exclusion.

Note Note When any of the above filters is in effect, a comment bar appears near the bottom of the Folder Compare view. You can click the Filters icon on the bar to edit these filters.

Note Note If a file filter determines that a file on one side of the comparison should be hidden but the corresponding file on the other side should be visible, both are made visible and the one that should be hidden will appear colored teal (blue-green).

To clear all Other File Filters:

Click the Clear button to clear all the filter settings on this tab.


 Picture Compare options

Picture Compare Options win

Tools > Options > File Views > Picture

You can change the colors used in Tolerance mode in Picture Compare sessions.

Change the solid colors as desired, or select Gray Scale, Red Scale or Blue Scale to "tint" the left image, so that it shows through on the differences panel.

Set the Background Color to control the color of the panels that hold the images.


 Picture Compare session settings

Picture Compare Session Settings

Session > Session Settings

To edit the rules that control a picture comparison:

1. In a Picture Compare session, from the Session menu choose Session Settings.
2. Click the tab containing the settings you want to edit.

Specs

Format: Specify the File Format to be used when reading the left and/or right files. The default selection is Detected, which means the File Format will be selected based on file masks.

Comparison: These options (also available on the toolbar) control how the images are compared. See the Picture Comparison topic for details.

3. The drop-down selection at the bottom of the dialog controls the scope of your changes. Select Use for this view only to affect the current session, or Update session defaults to apply your changes to all new sessions of this type.

Additional choices are shown if the picture comparison is a child session spawned from a folder comparison. Use for these files within parent session causes the current folder comparison to remember the sessions and use them whenever this particular pair of files is compared. Use for all files within parent session causes these rules to be used for other picture comparisons originating from the current folder comparison.

4. Modify the desired settings, and then click OK.


 Rename

Rename

Actions > Rename

On the Actions menu, the Rename Rename command renames the selected files and folders.

In the Action subsection, you can select either DOS Compatible or Regular Expressions rename. DOS Compatible expands wildcards using DOS rules. Regular Expressions rename uses Perl-compatible regular expressions.

DOS Rename

To rename files using DOS Compatible Regular Expressions, select files in the Folder Viewer and select Rename Rename from the Actions menu. Select DOS Compatible from the Rename dialog. In the New Mask field, enter the new name.

If multiple files or folders are selected, a base mask is computed which represents the overlap of all the names. An asterisk (*) is used to represent one or more characters, while a question mark (?) is used to represent a single character. Leave these characters alone, but change others to produce unique names for each of the selected files or folders.

Example:

Assume that you've selected the following files to rename:

abc1.txt

abc2.txt

abc3.txt

If you enter "abc?.bak" in the New Name, the files will be renamed to:

abc1.bak

abc2.bak

abc3.bak

Or, enter "xyz?.txt" in the New Name field, and the files will be renamed to:

xyz1.txt

xyz2.txt

xyz3.txt


Rules_vs_Formats

In Beyond Compare, File Formats describe the syntax of specific kinds of files by defining elements. File formats are typically picked automatically, based on the filename extension.

A Text Compare session defines which elements are important to the comparison. Notice that the session settings deal with elements in a more abstract manner while the various File Formats handle the syntax details.

To change the default importance of an element type:

1. In the Home view's Saved sessions tree, under the Edit session defaults branch, select Text Compare.
2. In the tabbed control to the right of the tree, select the Importance tab.
3. Mark or unmark the appropriate check boxes.
4. Click Save.

To override importance only in the current Text Compare view:

1. Open Sessions > Session Settings Rules and select the Importance tab.
2. Mark or unmark the appropriate check boxes.
3. At the bottom of the dialog, choose Use for this view only from the drop-down.
4. Click OK.

To override importance in a Folder Compare session:

5. From the Folder Compare session, open a child Text Compare session.
6. Open Sessions > Session Settings Rules and select the Importance tab.
7. Mark or unmark the appropriate check boxes.
8. At the bottom of the dialog, choose Use for all files within parent session from the drop-down.
9. Click OK.


 Scripting options

Script Processing Options

Tools > Options > Scripts

Set these options to control how scripts are processed:

Enable Beep when finished for an audible cue that a script has finished.

Enable Close when finished to exit the program when the script has finished.

Shared scripts folder specifies the location for shared scripts. If a script filename is not found in the current directory, Beyond Compare will look for it here.


 Setting program preferences

Setting Program Preferences

Tools > Options

To set program preferences:

1. From the Tools menu, choose Options Options to open the Options dialog.
2. In the list at the left, click the item containing the options you want to set:

Startup

General

Tabs

Backups

Open With

Scripts

Folder Views

Confirmations

Display

Compare Colors

Log

File Views

Display

Compare Colors

Next Difference

Text

Data

Picture

3. On any page, click Factory Defaults to revert the options on that page back to Scooter Software's default settings.
4. Modify the desired settings, and then click Apply to accept the changes, or OK to apply and close.


 Save snapshot

Save Snapshot

Tools > Save Snapshot

To save a snapshot:

1. On the Tools menu, select Save Snapshot.
2. Enter the path of the folder tree to be saved. If you access Save Snapshot from a Folder Compare session, you have the option of selecting the left or right base folders from that session.
3. Mark the appropriate boxes to also include CRCs computed from each file's contents, version data, or expanded zip contents. These options will make it take longer to create the snapshot, but the results will be more thorough.

CRCs Includes CRC32 calculations in the snapshot.

Version data Includes file version, typically found in application files such as .exe, .dll, .ocx, etc.

Archive contents Includes expanded listing of zip file contents in the snapshot.

4. The Use file filters checkbox is available when Save Snapshot is opened from a Folder Compare session. Mark this box to uses the Folder Compare session's file filters to limit what's included in the snapshot.
5. Mark the Empty folders box to include empty folders, or folders whose entire contents have been filtered out.
6. Click Start and a dialog will prompt for the filename and location to save the snapshot to.


 Startup options

Startup Options

Tools > Options > Startup

Startup options:

When Beyond Compare starts up, it normally shows the Home view. To have the program automatically start up with the same sessions that were open the last time you used Beyond Compare, specify the same workspace name in the Load workspace and On Exit, save workspace as fields. You can also use the Save Workspace As and Load Workspace commands on the Session menu for further control.

When you start Beyond Compare with a pair of files specified, the program can display a dialog with a comparison summary, rather than taking the time to display the entire side-by-side comparison. To preface a file comparison with the quick compare dialog:

1. Mark the check box labeled When starting with file comparison, show quick compare dialog.
2. Select Binary quick compare to perform a byte-by-byte comparison, or Rules-based quick compare to use the File Format rules appropriate for the specified files.
3. Mark the Open view automatically if files are different check box if you want the dialog to only appear when the files match.

The Check for updates every ... days option determines how often Beyond Compare checks our website for new versions of the software.

win To add Beyond Compare to Explorer's right-click menu:

Mark the Include Beyond Compare in Explorer context menu check box.

Select any of the optional commands listed in the table and choose Main menu or Submenu to include it in the context menu. Enable Compare Using to add submenu that lists specific viewers, such as the Data Compare viewer and the Hex Compare viewer. This allows you to override the viewer that would normally be selected via the File Formats list. Enable Merge to add 3-way merge support to the context menu, and Sync to support synchronizing folders from Explorer.


 Synchronize

Synchronize

Actions > Synchronize > . . .

On the Actions menu, the Synchronize submenu has commands that synchronize the current selection.

Update Left UpdateLeft

Copies newer and orphan files from right to left.

Update Right UpdateRight

Copies newer and orphan files from left to right.

Mirror to Left MirrorLeft

Replaces all different items on left, deletes any orphans on left, and copies any right side orphans to the left.

Mirror to Right MirrorRight

Replaces all different items on right, deletes any orphans on right, and copies any left side orphans to the right.


 Tabbed interface options

Tab Options

Tools > Options > Tabs

When working with multiple sessions simultaneously, Beyond Compare can open them in independent windows, or under tabs in a single window. These options control that behavior.

To control new sessions:

Select either A new window or A new tab for newly created sessions.

To control child sessions:

Select either A new window or A new tab for newly created File Compare sessions that are opened directly from a Folder Compare session.

To control miscellaneous tab behavior:

Set these options to reflect your preferences.

If you uncheck both Closing last remaining tab closes the window and Hide tab bar if single tab then closing the last tab will return to the Open Session page.


 Setting Text Compare alignment

Text Compare Alignment

Session > Session Settings > Alignment

The Alignment tab settings control the algorithm for aligning lines left and right in the comparison.

The Standard method aligns the files by comparing successively smaller sections of each file. Parts of the alignment can be shown before the entire comparison is finished.

Skew tolerance represents how far the algorithm will look for matches. When comparing files with many or large inserts, a larger tolerance can improve the alignment.

The Use closeness matching option attempts to align the remaining mismatched lines based on their similarity.

The Alternative method aligns the files using a standard LCS approach. This can give better matches in certain cases, such as large inserts or when the files contain a lot of repeating text. Since files are compared all at once, larger file scans take much longer than the standard method, and the files are not displayed until the comparison is complete. It does not support similarity comparisons, so mismatches will be grouped in blocks.

Mark the Never align mismatches checkbox to show mismatched lines as blocks of added and deleted text rather than edits.

A merge conflict is...

In a Text Merge session, the Session Settings dialog includes an option for defining the scope of conflicts. (A conflict occurs when the same section of text has changes on both left and right sides.) Select Only different change lines to limit conflicts to where each line has changes on both sides. Select Changes separated by xxx lines to identify left and right changes in the same vicinity as conflicts.


 Setting Text Compare formats

Text Compare Formats

Session > Session Settings > Formats

Specify the File Format to be used when reading the left and/or right files. The default selection is Detected, which means the File Format will be selected based on file masks.

Encoding overrides allow this session to override the character encoding to be used for each file, normally controlled by the selected File Format. The default is None, which means the File Format's encoding choice will be used.


 Setting Text Compare importance

Text Compare Importance

Session > Session Settings > Importance

These settings control which differences you consider important in the current session. Important differences will be colored red in the comparison. Unimportant differences will be blue (or not highlighted at all if Ignore Unimportant Differences is enabled).

Grammar elements

Mark the boxes in the list of items that are important to the comparison. The list contains elements that are defined by the File Format's grammar. Click the Edit Grammar button to examine or change the grammar definitions in the selected File Format.

Default text

This section controls the importance of text not defined in the grammar (or for File Formats that don't have a grammar defined).

Leading whitespace controls whether whitespace (spaces and tabs) at the start of the line is important.

Embedded whitespace controls whether whitespace in the middle of the line is important.

Trailing whitespace controls whether whitespace at the end of the line is important.

Everything else refers to non-whitespace text not already defined as a grammar element.

Mark Character case if the "everything else" text is case-sensitive. (The case sensitivity of grammar elements is controlled by the File Format's grammar.)

Miscellaneous

To consider an extra blank line (or an inserted line with only unimportant text) an important difference, mark the Orphan lines are always important checkbox.

Beyond Compare normally ignores differences in line termination style, such as CR/LF in Windows text files vs. LF alone in Unix files. To find differences in line termination on a line-by-line basis, mark the Compare line endings (PC/Mac/Unix) checkbox. (To examine the line endings, enable the Visible Whitespace ShowWS option in the File Compare's View menu.)

See also

Rules vs. formats


 Text Compare options

Text Compare Options

Tools > Options > File Views > Text

This page allows you to customize aspects specific to Text Compare and Text Merge sessions.

Editing features

Auto indent

When enabled and a new line is created, it is automatically indented to match the leading whitespace on the previous line.

Backspace unindents

When enabled and positioned immediately after the leading whitespace on a line, pressing the BACKSPACE key deletes enough whitespace to match the next indentation level, as defined by preceding lines.

Allow positioning beyond end of line

When enabled, the edit cursor is not constrained by the end of text on a line.

Display options

Most of the display settings for Text Compare and Text Merge are found on the Display and Compare Colors pages of the Options dialog. Settings specific to the text editors are here.

You can add or subtract pixels from Extra line spacing to change the density of text in the view.

To show a vertical line at a specific column position, set Show column line at to the desired value. Set it to zero (0) to hide the line. If you use a proportionally spaced font, the column position will be determined by the width of the space character.

Enable Show filtered line counts to display a summary of lines hidden by display filters:

To use an alternate font for the narrower input panes in a Text Merge session, enable Different font for merge input panes.

Other miscellaneous options

Initialize "Text to find" to be current word

Causes the current selection to be filled in as the search text for the Find Find command.

Number of context lines

Defines the number of matching lines to display before and after a difference section when the Text Compare's Show Context ShowContext is used.


 Setting Text Compare replacements

Text Compare Replacements

Session > Session Settings > Replacements

Replacements identify repetitive changes that should be considered unimportant.

To define a replacement rule:

On the Replacements tab, click New. Specify what Text to find in the left editor pane and the Replace with text to be found in the right pane.

Match character case

Match only text with the same uppercase and lowercase characters.

Whole words only

Match on the whole words but not parts of words.

Regular expression

Indicates the search string is a PCRE regular expression. You can use the dropdown button to the right of the search string to insert common regular expression elements. Click the RE Examples button for more info.


 Text Compare session settings

Text Compare Session Settings

Session > Session Settings

To edit the rules that control a text comparison:

1. In a Text Compare session, from the Session menu choose Session Settings.
2. Click the tab containing the settings you want to edit:

Specs

Format

Importance

Alignment

Replacements

3. The drop-down selection at the bottom of the dialog controls the scope of your changes. Select Use for this view only to affect the current session, or Update session defaults to apply your changes to all new sessions of this type.

Additional choices are shown if the text comparison is a child session spawned from a folder comparison. Use for these files within parent session causes the current folder comparison to remember the sessions and use them whenever this particular pair of files is compared. Use for all files within parent session causes these rules to be used for other text comparisons originating from the current folder comparison.

4. Modify the desired settings, and then click OK.


Text Format - Conversion Settings

Text Format > Conversion

The Conversion tab defines how files should be loaded and saved.

Text Compare sessions can compare plain text files, such as programming source files, directly. To compare files with structured or proprietary formats, it may be necessary to first extract the plain text content from the file. For example, Microsoft Word documents are binary files, but Beyond Compare can extract and compare their textual content. Beyond Compare can highlight differences in words and sentences but cannot identify differences in formatting or embedded images.

Select a conversion method for pre- and post-comparison processing. For the External Program method, in the Loading field specify the path and appropriate command line switches for the pre-comparison conversion program. The following variables will be replaced with the indicated information:

%s source file

%t target file

%n original file

%x original extension, including '.'

If there is a method for converting edited text back to the original format, you can unmark the Disable editing checkbox and in the Saving field specify the path and command line switches for the post-editing conversion program. The above variables apply.

The Encoding of most text files can be detected automatically, but you can specify a specific code page to use.

The characters per line limit setting will break long lines at the indicated length. Those artificial line breaks are removed when saving an edited file.

Mark the Ctrl+Z indicates end of file checkbox for file formats that use the hex value 1A for an EOF marker.


Text Format - General Settings

Text Format > General

On the General tab, specify the file types to be associated with this format.


Text Format - Grammar Settings

Text Format > Grammar

The Grammar tab defines the syntax of a file.


Text format editor settings

Text Format - Miscellaneous Settings

Text Format > Misc

Insert spaces instead of tabs

When disabled, pressing the TAB key inserts a tab character into the file. When enabled, an appropriate number of spaces is inserted instead.

The Tab stop setting determines the interval between tab stops. Pressing the TAB key advances the cursor to the next tab stop.

Mark the Lines are independent checkbox when each line is an independent record and it is not useful to manipulate consecutive mismatches lines as a section.

Mark the Column-based data checkbox when the position of each character on a line is important and lines should be compared column-by-column.


 Touch

Touch

Actions > Touch

On the Actions menu, the Touch Touch command modifies the timestamp (date/time last modified) of the selected files.

If Copy timestamps from other side is selected, then the timestamps of the selected files will be set to match those on the other side. If Set timestamps to --> is used, then any date/time can be selected from the calendar.

The Default selection controls how the calendar is initialized. Current system time will initialize the calendar to the current time. Last touch will recall the timestamp from the last touch operation. The Default selection only initializes the calendar -- you can still change it to any date or time.

If a folder is selected, the Touch command will attempt to change the folder's timestamp but not that of its contents. This command will fail if the operating system does not allow changing folder timestamps.